This commit is contained in:
ChuXun
2025-10-11 18:15:20 +08:00
parent 98c6e4b11a
commit cf8f4c5c3a
283 changed files with 105716 additions and 3 deletions

View File

@@ -0,0 +1,29 @@
/**
* 表单提交工具方法
*/
var FORM_UTILS = {
post:function(url,params){}
}
// post 提交
FORM_UTILS.post = function(url, params,target){
if(!url || !target){
return ;
}
var form = document.createElement("form");
form.action = url;
form.method ="post";
form.target = target;
if(params){
for(var i in params){
var ele = document.createElement("textarea");
ele.name = params[i].name;
ele.value = params[i].value;
form.appendChild(ele);
}
}
document.body.appendChild(form);
form.submit();
// 移除
document.body.removeChild(form);
}