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

objet de la barre d'adresse de localisation

Objet de la barre d'adresse de localisation

  • href?: Obtenez l'adresse complète dans la barre d'adresse. Un saut de page Web JS peut être réalisé. location.href = ? http://www.sina.com.cn ?;

  • nom d'h?te?: nom d'h?te

  • chemin d'accès?: chemin du fichier et nom de fichier

  • recherche?: cha?ne de requête.

  • protocole?: protocole, tel que?: http://, ftp://

  • hash?: nom de l'ancre. Par exemple?: #top

  • reload([true]) : actualisez la page Web. Le vrai paramètre signifie une actualisation forcée

Remarque?: Une fois tous les attributs réaffectés, la page Web s'actualisera automatiquement.

<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>php.cn</title>
        <script type="text/javascript">
            //實例:測試不同瀏覽器
            var str = "<h2>地址欄對象</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>


Formation continue
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> <script type="text/javascript"> //實例:測試不同瀏覽器 var str = "<h2>地址欄對象</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>
soumettreRéinitialiser le code