JS wind.open用post提交
function openPostWindow(url, data, name)
{
var tempForm = document.createElement("form");//创建form表单
tempForm.id="tempForm1";
tempForm.method="post";
tempForm.action=url;
tempForm.target=name;
var hideInput = document.createElement("input");//创建input框
hideInput.type="hidden";
hideInput.name= "mapObj"
hideInput.value= data;//将数据保存到Input框中
tempForm.appendChild(hideInput);
tempForm.addEventListener("onsubmit",function(){ openWindow(name); });//绑定事件
document.body.appendChild(tempForm);
var evt;
if (document.createEvent) { // DOM Level 2 standard
evt = document.createEvent("MouseEvents");
evt.initMouseEvent("onsubmit", true, true, window,
0, 0, 0, 0, 0, false, false, false, false, 0, null);//执行点击事件
tempForm.dispatchEvent(evt);
} else if (el.fireEvent) { // IE
tempForm.fireEvent('onsubmit');//执行点击事件
}
tempForm.submit();
document.body.removeChild(tempForm);
}
function openWindow(name)
{
window.open('about:blank',name);
}
- js的post提交
- asp.net使用JS+form表单Post和Get方式提交数据
- window.open (参数使用post方式提交)
- JS使用post提交的两种方式
- 调用prototype.js的ajax进行post提交示例源码
- window.open()的用法及如何以post方式提交
- node.js实现form表单提交(POST)
- js构建form表单 以post方式提交 一般用于导出文件
- js用escape()轻松搞定ajax post提交汉字的乱码问
- node.js中post如何被提交
- js 模拟表单post方式提交
- 调用prototype.js的ajax进行post提交示例源码
- 调用prototype.js的ajax进行post提交示例源码
- js友好提示是否继续,post提交
- node.js 下依赖Express 实现post 4种方式提交参数
- 调用prototype.js的ajax进行post提交示例源码
- 【js类库AngularJs】解决angular+springmvc的post提交问题
- 利用JS使用POST方式提交请求的方法
- thinkphp 后台获取argularjs http提交的post数据
- js模拟POST提交数据