国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > AJAX > 正文

js動態(tài)生成form 并用ajax方式提交的實現(xiàn)方法

2024-09-01 08:33:45
字體:
來源:轉載
供稿:網(wǎng)友

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="method";     tempInput.value=methodName; //the parameter of method in 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中支持這種寫法,其他版本尚未試過。

以上這篇js動態(tài)生成form 并用ajax方式提交的實現(xiàn)方法就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持VeVb武林網(wǎng)。


注:相關教程知識閱讀請移步到JavaScript/Ajax教程頻道。
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 安岳县| 琼海市| 贡山| 云和县| 万州区| 拉萨市| 广丰县| 正宁县| 南涧| 深水埗区| 三门峡市| 桃园县| 临安市| 罗甸县| 竹北市| 富锦市| 昌江| 马鞍山市| 乾安县| 商河县| 呼伦贝尔市| 鹤岗市| 盐津县| 陵川县| 桐柏县| 彰化县| 台中市| 彩票| 嘉黎县| 九龙城区| 新竹市| 洛隆县| 板桥市| 旺苍县| 祁东县| 张家口市| 涪陵区| 百色市| 翁牛特旗| 巨鹿县| 秦皇岛市|