摘要:
<script type="text/javascript">//可以在构造对象时传递参数/*function geobject(){ //在执行第一行代码之前,js引擎会为我们生成一个对象 this.username="zhangsan"; this.passworld="123"; this.getobject=function(){ alert(this.username+this.passworld); } //此处有一个隐藏的return,用于将之前生成的对象返回 } var object=new geobjec 阅读全文