前端js再新窗口打开页面,以post传递参数方式
2017-07-13 17:04
2771 查看
//前端js打开新页面,以post传递参数
以下url为请求地址,beginTime为我所需传递的参数,以下方法就是替换成form表单提交的方式实现此功能
var newWindow = window.open(url,"");
var html =
"";
html += "<html><head></head><body><form id='formid' method='post' action='"+url+"'>";
html += "<input type='hidden' name='beginTime' value='" + beginTime +"'/>";
html += "</form><script type='text/javascript'>document.getElementById(\"formid\").submit()</script></body></html>";
newWindow.document.write(html);
以下url为请求地址,beginTime为我所需传递的参数,以下方法就是替换成form表单提交的方式实现此功能
var newWindow = window.open(url,"");
var html =
"";
html += "<html><head></head><body><form id='formid' method='post' action='"+url+"'>";
html += "<input type='hidden' name='beginTime' value='" + beginTime +"'/>";
html += "</form><script type='text/javascript'>document.getElementById(\"formid\").submit()</script></body></html>";
newWindow.document.write(html);
相关文章推荐
- 在js 中window.open()打开新页面,post方式传递参数到新页面上
- js使用post 方式打开新窗口,隐藏Url参数
- JS: 打开新窗口时(open window),使用传递post参数
- EAS8.0,EAS8.2,WAF2,JS,打开新页面,打开新窗口,传递参数
- js用POST方式页面跳转,避免在地址栏中显示传递参数
- 数据采集-关于post生成ticket传递参数给另一个页面用get方式验证登录
- 在Js页面通过POST传递参数跳转到新页面详解
- 这篇文章主要介绍了js使用post 方式打开新窗口的相关资料,需要的朋友可以参考下
- js打开新窗口并且POST传入参数
- JS 打开一个模式窗口,使用Cookie传递一个参数
- js使用post 方式打开新窗口
- 网页编程,JS模态窗口,父页面向子页面传递参数
- JS实现网页开窗刷新 GeT传递参数成功 远程打开页面失败的解决方法
- 利用js控制表单POST传递多个动态参数到另一页面
- js使用post 方式打开新窗口
- js 通过post方式打开页面 利用html5本地存储获取数据
- [js] post 方式打开新窗口
- 页面之间传递参数js的方式
- 使用window.open打开新窗口,以post方式传参数
- js前端获取页面传递的参数