close
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script type="text/javascript">
		function Person(height,weight){
			this.height=height; /*在function裡面定義物件屬性*/
			this.weight=weight;
		}
		var Amy=new Person(160,40);
		document.write(Amy.height+' '+Amy.weight);
	</script>
</body>
</html>

 

 

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script type="text/javascript">
		var person=function Person(height,weight){
			document.write(height+' '+weight);
		}
		var Amy =person.bind(null);
		Amy(160,40);
	</script>
</body>
</html>

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 Jerry 的頭像
    Jerry

    Bug倉庫 // 程式日記

    Jerry 發表在 痞客邦 留言(0) 人氣()