js拼装表单完成Post请求发送
来源:互联网 发布:react pdf js 编辑:程序博客网 时间:2024/05/29 13:07
function post(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];
temp.appendChild(opt);
}
document.body.appendChild(temp);
temp.submit();
return temp;
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];
temp.appendChild(opt);
}
document.body.appendChild(temp);
temp.submit();
return temp;
}
调用方法
post('pages/statisticsJsp/excel.action', {html :prnhtml,cm1:'sdsddsd',cm2:'haha'});
0 0
- js拼装表单完成Post请求发送
- js发送post请求
- Golang发送post表单请求
- 发送post请求(表单的方式)
- form表单post请求发送及回收
- 模拟发送POST请求,提交表单
- JS发送Get请求和Post请求
- js发送post请求下载文件
- JS实现使用POST方式发送请求
- node.js发送http(get,post)请求
- Node.js中http 接收get请求、接收post请求、发送get请求、发送post请求
- 模拟表单发送POST,GET请求获取数据
- axios发送post请求,提交图片类型表单数据
- Scrapy模拟表单和Ajax发送POST请求
- Node.js 处理post请求(表单提交)
- IWebBrowser2 发送post请求
- WebClient发送POST请求
- android发送post请求
- 小记打包 和svn上传命令
- 八大排序算法
- MediaPlayer遇到的几个坑
- python——注释 语句格式 标识符
- Web应用安全之XSS高阶
- js拼装表单完成Post请求发送
- 打印机配置连接
- jS实现兼容的div拖放功能
- C++ -- variadic template (可变参数模板)
- 关于在NGUI坐标系挂载父级SetParent(null)后回到屏幕中心的问题
- sql查找两条以上的数据 having
- composer安装
- elasticsearch源码分析之Gateway(六)
- axis2 发送报文报告Dangling meta character '*' near index 0 异常