javascript模拟post提交隐藏地址栏的参数
2014-09-03 00:00
816 查看
通过js模拟post提交
1:请求需要的参数过长,超过get允许的最大长度
2:想要隐藏地址栏的参数
1:请求需要的参数过长,超过get允许的最大长度
2:想要隐藏地址栏的参数
//新创建一个form表单 document.write('<form name=myForm></form>'); var myForm=document.forms['myForm']; myForm.action='runEmpAttendance'; myForm.method='POST'; var input = document.createElement('input'); input.type = 'text'; input.name = 'userId'; input.value = 100; myForm.appendChild(input); myForm.submit(); //使用jsp中已经存在的form表单,添加其他的参数 var myForm = document.forms['listEmployee']; //表单的name var input = document.createElement('input'); input.type = 'hidden'; input.name = 'currentPage'; input.value = 1; myForm.appendChild(input); myForm.method= 'POST'; myForm.submit();
相关文章推荐
- javascript模拟post提交隐藏地址栏的参数
- 使用表单post方式提交到某个servlet,请求参数不会在地址栏显示,达到隐藏请求参数的目的
- CURL模拟表单post提交及相关常用参数的使用(包括提交表单同时上传文件)
- C# 模拟POST提交(根据URL地址,参数以xml形式传递)
- javascript模拟post提交
- 如何获取表单提交值 post(地址栏不带参数)或get(地址栏带参数)
- JavaScript Post提交数据并跳转到页面(模拟Form表单提交)
- Javascript模拟FORM以POST方式提交表单数据
- XSS Payload——用javascript模拟post提交表单
- 兼容处理前台post提交form表单和get在地址栏传递中文参数
- CURL模拟表单post提交及相关常用参数的使用(包括提交表单同时上传文件)
- Android中模拟post表单提交,带参数及文件参数
- 奇怪!post提交 地址栏参数竟然可见
- 通过表单form模拟post方式提交多参数实现文件下载
- 奇怪!post提交 地址栏参数竟然可见
- 在.NET 中模拟提交Post数据
- 使用php模拟post提交数据
- javascript取得地址栏参数
- C#.net模拟提交表单POST
- JSP中截获POST或GET请求提交的所有参数