JavaScript -- Location

-----043-Location.html-----

 <!DOCTYPE html>
 <html>
 <head>
     <meta http-equiv="content-type" content="text/html; charset=utf-8">
     <title>标题</title>
 </head>
 <h3>Location</h3>
 <body>
 <ul>
 <script type="text/javascript">
     document.write("<li>Href:  " + location.href);
     document.write("<li>Protocol:  " + location.protocol);
     document.write("<li>Host:  " + location.host);
     document.write("<ol><li>Hostname:  " + location.hostname);
     document.write("<li>Port:  " + location.port + "</ol>");
     document.write("<li>PathName:  " + location.pathname);
     document.write("<li>锚:  " + location.hash);
     document.write("<li>查询段:  " + location.search);
 </script>
 </ul>
 <button onclick="location.assign('http://www.google.com')">加载谷歌</button>
 <button onclick="location.replace('http://www.google.com')">用谷歌取代</button>
 <button onclick="location.reload(false)">刷新</button>
 <button onclick="location.reload(true)">强制刷新</button>
 </body>
 </html>

JavaScript -- Location

上一篇:TOP100summit 2017 七牛云许式伟:不用JAVA和C语言,我为什么坚持Go语言


下一篇:Oracle E-Business Suite并发处理机制(Current Processing)