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

📄 8-8.htm

📁 javascript 的原代码,是一本书的代码
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript">
     function phone(name,phoneno,site){
	    this.name = name;
		this.phoneno = phoneno;
		this.site = site;
		this.rate = 0.3;
		this.show = display;
		this.getatrr = getproperty;
	 }
	 function display(anyphone){
	     with(anyphone){
		     var str = "name: "+name+"<br>"+"phoneno: "+phoneno+"<br>"+"site: "+site;
			 document.write(str);
		 }
	 function getproperty(theobj){
	     var str="";
	     for(var attr in theobj){
		    str +=attr+"  "+theobj[attr]+"<br>";
	    }
		document.writeln(str);
	 }
 }
</script>
</head>

<body>
   <script language="javascript">
    
	 var wang = new phone("zhang","13824","tianjin");
	  wang.getatrr(wang);
   </script>
</body>
</html>

⌨️ 快捷键说明

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