利用JS使用POST方式提交请求的方法
来源:互联网 发布:ubuntu用户组权限设置 编辑:程序博客网 时间:2024/06/05 06:27
利用JavaScript模拟POST方式提交请求的方法
function post(URL, PARAMS) { var temp = document.createElement("form"); temp.action = URL; temp.method = "post"; temp.style.display = "none"; PARAMS =PARAMS ==null? {}:PARAMS; for (var x in PARAMS) { var opt = document.createElement("textarea"); opt.name = x; opt.value = PARAMS[x]; // alert(opt.name) 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方式提交请求的方法
- 利用JS使用POST方式提交请求的方法
- 利用JS使用POST方式提交请求的方法
- JS使用POST方式提交请求
- 怎样利用JS提交POST请求
- JS使用post方式提交
- 如何使用nodejs提交表单方式的post请求?
- nodejs的http.request使用post方式提交数据请求
- HTTP请求的POST方式的提交
- js提交post请求
- js提交POST请求
- JS实现使用POST方式发送请求
- node.js post方式的表单提交
- js AJAX请求的 $.post方法的使用
- android 使用HttpURLConnection方式提交get/post请求
- jsp页面onclick 事件使用post方式提交请求
- js post提交方法
- IO多路复用之select、poll、epoll详解
- Dynamics CRM2016 基于选择的视图项来显示和隐藏home上的ribbon按钮
- chrome浏览器去掉HTML5 video下载按钮
- Android之在服务中的Window的关闭方法(利用事件分发)
- CSS布局样式:左右布局,左边定宽,右边自适应
- 利用JS使用POST方式提交请求的方法
- gstreamer 核心源码source创建和识别typefind原理浅析(一)
- 自适应和响应式的区别
- hbase获取region以及读取每个region的第一行
- Windows上搭建Kafka运行环境
- 按位操作外部设备的寄存器:方法一
- icheck结合datatable使用方法及实现全选、反选功能
- JAVA的abstract修饰符 && 接口interface用法 && 抽象类和interface的差别
- 部署基于tomcat 8 的solrCloud 5.5集群