博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
form表单 post 请求打开新页面
阅读量:4627 次
发布时间:2019-06-09

本文共 1073 字,大约阅读时间需要 3 分钟。

function postOpenWindow(URL, PARAMS, target) {                    if(target == null) target = "_blank";                    var temp_form = document.createElement("form");                    temp_form.action = URL;                    temp_form.target = target;                    temp_form.method = "post";                    temp_form.style.display = "none";                    for(var x in PARAMS) {                        var opt = document.createElement("textarea");                        opt.name = x;                        opt.value = PARAMS[x];                        temp_form.appendChild(opt);                    }                    document.body.appendChild(temp_form);                    temp_form.submit();                    document.body.removeChild(temp_form);                }                postOpenWindow("http://localhost:8080/111.html", {}, "_blank");

 

备注 :直接访问汇报405  错误

需要nginx配置

 location / {

            root   E:/test;
            index  111.html 111.htm;
            error_page 405 =200 /111.html;
            try_files $uri $uri/ /111.html;
 }

 

转载于:https://www.cnblogs.com/zhaozhenzhen/p/11098192.html

你可能感兴趣的文章
kindeditor 代码高亮设置
查看>>
图的邻接表存储
查看>>
2018 leetcode
查看>>
PHP中获取当前页面的完整URL
查看>>
Chapter 4 Syntax Analysis
查看>>
vi/vim使用
查看>>
讨论Spring整合Mybatis时一级缓存失效得问题
查看>>
Maven私服配置Setting和Pom文件
查看>>
Xcode10 library not found for -lstdc++ 找不到问题
查看>>
Mysql 8.0.13如何重置密码
查看>>
发布功能完成
查看>>
excel 合并单元格
查看>>
How to Create Modifiers Using the API QP_MODIFIERS_PUB.PROCESS_MODIFIERS
查看>>
待飞笔记(第一天 )
查看>>
解惑好文:移动端H5页面高清多屏适配方案
查看>>
traefik添加多证书
查看>>
忽略UserInterfaceState.xcuserstate
查看>>
ReactNative--Flexbox布局
查看>>
java实现读取文件大全
查看>>
[Cordova] 无法显示Alert视窗
查看>>