<html><body><script type="text/javascript">function person(firstname,lastname,age,eyecolor){this.firstname=firstnamethis.lastname=lastnamethis.age=agethis.eyecolor=eyecolor}myFather=new person("John","Adams",35,"black")document.write(myFather.firstname + " 的年齡是 " + myFather.age + " 歲。")</script></body></html>
在這個程序里為什么在person 前面加new 不加就不行new 我用 下劃線標(biāo)識
慕尼黑9372261
2016-04-13 14:16:29