zoukankan      html  css  js  c++  java
  • js 模拟 post

    js 模拟 post 提交

            //js 模拟创建一张表
                    var target = '_blank';
                    var tempForm = document.createElement("form");
                    tempForm.id = "tempForm1";
                    tempForm.method = "post";
                    tempForm.action = '<?php echo $HTTP_URL;?>capture';
                    tempForm.target = target;
            
            //添加表元素
    var authkeyInput = document.createElement("input"); authkeyInput.type = "hidden"; authkeyInput.name = 'authkey'; authkeyInput.value = 'XX'; tempForm.appendChild(authkeyInput); var libInput = document.createElement("input"); libInput.type = "hidden"; libInput.name = 'lib'; libInput.value = 'serverControl'; tempForm.appendChild(libInput);

            //添加表
            document.body.appendChild(tempForm);
                    
                    tempForm.submit();
                    document.body.removeChild(tempForm);

     其他:http://www.360doc.com/content/12/0731/14/9629506_227464533.shtml

  • 相关阅读:
    java基础-Runnable与Callable
    java基础-Reference三
    java基础-Reference二
    java基础-Reference一
    jvm-gc
    jvm-简介
    java基础-enum
    采购申请->MRP
    消耗性物料采购注意事项
    供应商建立的相关配置
  • 原文地址:https://www.cnblogs.com/la-isla-bonita/p/3627893.html
Copyright © 2011-2022 走看看