zoukankan      html  css  js  c++  java
  • form表单 post 请求打开新页面

    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;
     }

  • 相关阅读:
    安装Joomla!3
    keepalived + lvs
    systemd 服务介绍
    lvs 进阶 第二章
    lvs 初始 第一章
    iptables 最终 第四章
    bind 笔记
    iptables 扩展匹配 第三章
    iptables 认识 第二章
    iptables 初见 第一章
  • 原文地址:https://www.cnblogs.com/zhaozhenzhen/p/11098192.html
Copyright © 2011-2022 走看看