摘要:
1 //创建一个对象,然后给这个对象新建属性和方法 2 3 var box = new Object(); //创建对象 4 box.user='Fu'; //添加属性 5 box.age=23; 6 box.run=function(){ 7 return this.user+this.age+'运行中...'; 8 } 9 //this表示new Object()实例化出来的那个对象10 11 alert(box); //object Object12 alert(box.user);13 alert(box.run()... 阅读全文