⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pathname属性.html

📁 javascript即用即差核心对象手册
💻 HTML
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
 <table align="center" border="1" bordercolor="#009900" style="border-collapse:collapse">
    <script>
       with(document)
	   {   
	      writeTable("属性","属性值");
		  writeTable("URL",location.href);
		  writeTable("host",location.host);
		  writeTable("hostname",location.hostname);
		  writeTable("port",location.port);
		  writeTable("pathname",location.pathname);
		  writeTable("protocol",location.protocol);
	   }
	   function writeTable(str1,str2)
	   {
	      with (document)
		  {
		     write("<tr>");
			 write("<td>");write(str1);write("</td>");
			 write("<td>");write(str2);write("</td>");
			 write("</tr>");
		  }
		  
	   }
   </script>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -