/**
* 以post方式请求url
* URL url连接字符串
* PARAMS 传递的参数,形式{var1:'abc',var2:2,var3:true}
*/
comm.globalfunc.post=function (URL, PARAMS) {
var temp = document.createElement("form");
temp.action = URL;
temp.method = "post";
temp.style.display = "none";
for (var x in PARAMS) {
var opt = document.createElement("textarea");
opt.name = x;
opt.value = PARAMS[x];
// alert(opt.name)
temp.appendChild(opt);
}
document.body.appendChild(temp);
temp.submit();
return temp;
}
以post方式请求url 的一个小函数
最新推荐文章于 2023-03-26 18:32:08 发布