zoukankan      html  css  js  c++  java
  • 网站跳转汇总

    1. document.location
    
    
    <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head>
     <body>
         <b>document.location使用举例 </b ><p>
          <script type ="text/javascript">
    
             document.write( " 当前位置: " + document.location + " <p> " );
             document.write( " 当前位置的url路径: " + document.location.pathname + " <p> " );
             document.write( " 当前位置的url协议: " + document.location.protocol + " <p> " );
             document.write( " 当前位置的url端口: " + document.location.port + " <p> " );
             // 设置新的location
             document.location.href= " http://www.baidu.com " ; //直接跳转的
             // window.open('http://www.baidu.com');
          </script>
    
    ```
  • 相关阅读:
    了解JVM原理
    封装JS
    “==”和Equals的区别
    SpringMVC请求RequestMapping() 请求乱码
    博客25周
    博客24周
    博客23周
    博客22周
    博客第21周
    博客第21周
  • 原文地址:https://www.cnblogs.com/amize/p/14403462.html
Copyright © 2011-2022 走看看