JavaScript----location对象

版权声明:一心不安 https://blog.csdn.net/qq_42700595/article/details/83444133


    <script language="JavaScript">
       document.write("<br>-----------------------------location对象---------------------------<br>");
       document.write("<br>host:本机地址 端口号 "+location.host);
       document.write("<br>hostname:本机地址 "+location.hostname);
       document.write("<br>href:协议 本机地址 端口号 项目名 项目页面 "+location.href);
       document.write("<br>pathname:项目名 项目页面 "+location.pathname);
       document.write("<br>port:端口号 "+location.port);
       document.write("<br>search "+location.search);
</script>

猜你喜欢

转载自blog.csdn.net/qq_42700595/article/details/83444133
今日推荐