亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

objek bar alamat lokasi

Objek bar alamat lokasi

  • href: Dapatkan alamat lengkap dalam bar alamat. Lompatan halaman web JS boleh direalisasikan. location.href = “http://www.sina.com.cn”;

  • nama hos: nama hos

  • nama laluan: laluan fail dan nama fail

  • carian: rentetan pertanyaan.

  • protokol: protokol, seperti: http://, ftp://

  • cincang: nama sauh. Contohnya: #top

  • muat semula([true]): Muat semula halaman web. Parameter sebenar bermaksud muat semula paksa

Nota: Selepas semua atribut ditetapkan semula, halaman web akan dimuat semula secara automatik.

<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>php.cn</title>
        <script type="text/javascript">
            //實(shí)例:測(cè)試不同瀏覽器
            var str = "<h2>地址欄對(duì)象</h2>";
            str += "地址欄地址:"+location.href;
            str += "<br>主機(jī)名:"+location.hostname;
            str += "<br>文件路徑及文件名:"+location.pathname;
            str += "<br>協(xié)議:"+location.protocol;
            document.write(str+"<hr>");
        </script>
    </head>
    <body >
    </body>
</html>


Meneruskan pembelajaran
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> <script type="text/javascript"> //實(shí)例:測(cè)試不同瀏覽器 var str = "<h2>地址欄對(duì)象</h2>"; str += "地址欄地址:"+location.href; str += "<br>主機(jī)名:"+location.hostname; str += "<br>文件路徑及文件名:"+location.pathname; str += "<br>協(xié)議:"+location.protocol; document.write(str+"<hr>"); </script> </head> <body > </body> </html>