JS 코드 :
var tempform = document.createElement ( "form"); tempform.action = "http : // localhost : 8080/test/user"; tempform.method = "post"; document.body.appendchild (tempform); // 제출 버튼 생성 var tempinput = document.createElement ( "입력"); tempinput.type = "숨겨진"; tempinput.name = "메소드"; tempinput.value = MethodName; // 디스패치 코드의 메소드 매개 변수. tempform.appendChild (Tempinput); // 양식 tempform.submit ()를 제출합니다. ext.ajax.request ({form : 'intpayform', method : 'post', success : function (data) {alert (data.responsetxt);}, 실패 : function () {}});이 작문 방법은 EXT 3에서 지원되며 다른 버전은 아직 시도되지 않았습니다.
Ajax에서 양식을 동적으로 생성하고 제출하는 위의 구현 방법은 내가 공유하는 모든 컨텐츠입니다. 나는 당신이 당신에게 참조를 줄 수 있기를 바랍니다. 그리고 당신이 wulin.com을 더 지원할 수 있기를 바랍니다.