Window.location.href以post方式传递参数的方法
来源:互联网 发布:战地4 mac版下载地址 编辑:程序博客网 时间:2024/05/22 13:05
原文地址:http://colddemon.iteye.com/blog/1608132
想用window.location.href跳转到另外一个界面。但直接传递get方法会暴露数据。而用ajax或表单提交,有时在执行了方法后,无法跳转到另外的页面。
下面可以实现跳转的效果,却又能够通过post传递方法隐藏数据。
有一个不足就是,在跳转到新页面后,点击“返回”返回的是个空界面,再次点击才能返回到提交界面。
其原意就是在页面上构造表单然后向后端 提交数据达到post请求方式,
如下
function selectThis(agentNo) { //window.location.href = contextPath+'/getAgentPosImportStatementListWithPaging.jhtml?agentNo='+agentNo; document.write("<form action=getAgentPosImportStatementListWithPaging.jhtml method=post name=form1 style='display:none'>"); document.write("<input type=hidden name=agentNo value='"+agentNo+"'/>"); document.write("</form>"); document.form1.submit();}
阅读全文
0 0
- Window.location.href以post方式传递参数的方法
- Window.location.href以post方式传递参数的方法
- window.location.href以post方式传递参数
- window.open 以post方式传递参数
- window.location.href()采用post传递数据
- window.location.href传递汉字参数
- window.location.href传递js对象参数及获取参数
- JAVASCRIPT下window.location.href通过url传递参数
- window.location传递参数
- 利用window.open实现post方式的参数传递
- 利用window.open实现post方式的参数传递
- href传递post方法。
- window.open url 参数post方式传递
- window.open url 参数post方式传递
- window.location.href后面的url带多个参数
- window.top.location.href 和 window.location.href 的区别
- window.top.location.href 和 window.location.href 的区别
- window.location.href和window.top.location.href的区别
- Jump Game II
- kinect1v使用步骤
- VT VMCS结构信息
- Volatile原理
- 需要产生随机数
- Window.location.href以post方式传递参数的方法
- Android仿iphone时间轴相册
- 钛极OS(TiJOS)物联网操作系统之小试牛刀(1)——灯、按键
- flume学习(三):flume将log4j日志数据写入到hdfs
- 回调函数
- for循环与for in循环
- 常用设置记录以防想不起来
- Elasticsearch(十一)elasticsearch搜索--最基本的工具
- mysql(一):mysql数据库以及创建表