zoukankan      html  css  js  c++  java
  • javascript-js模拟form页面提交跳转

    window.location.href跳转到另外一个界面。但直接传递get方法会暴露数据

    下面可以实现跳转的效果,却又能够通过post传递方法隐藏数据。 
    有一个不足就是,在跳转到新页面后,点击“返回”返回的是个空界面,再次点击才能返回到提交界面。 

    <script language=javascript>   
    document.write("<form action=abc.action method=post name=form1 style='display:none'>");  
    document.write("<input type=hidden name=name value='"+username+"'/>"); 
    document.write("</form>");
    document.form1.submit();
    </script>
  • 相关阅读:
    Sword 17
    Sword 16
    Sword 15
    Sword 14-II
    Sword 14-I
    Sword 13
    Sword 11
    Sword 10-II
    Sword 10
    【python+selenium】三种等待方式
  • 原文地址:https://www.cnblogs.com/bjlhx/p/6673053.html
Copyright © 2011-2022 走看看