Js代码: var tempForm = document.createElement("form"); tempForm.action="http://localhost:8080/test/user"; tempForm.method="post"; document.body.appendChild(tempForm); //create a submit button var tempInput = document.createElement("input"); tempInput.type="hidden"; tempInput.name