JS Code:
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";
tem Pinput.name= "Method";
tempinput.value=methodname//the parameter of the code of Dispatchaction.
Tempform.appendchild (Tempinput);
//submit the form
tempform.submit ();
Ext.Ajax.request ({
form: ' Intpayform ', method
: ' Post ',
success:function (data) {
alert ( Data.responsetext);
},
failure:function () {
}
EXT 3 supports this type of writing, and other versions have not yet been tried.
The above JS dynamic generation form and the implementation of the Ajax method is to share the whole of the content of everyone, hope to give you a reference, but also hope that we support the cloud-dwelling community.