js创建Object的两种方式//方法一:使用new操作符后跟Object构造函数var people=new Object(); //也可以用 var people={}; 效果一样people.name="windy";people.age=19;alert(people.name);alert(people.age);//方法二:使用对象字面量的表示法var man={name:"justin",age:20}alert(man.name);alert(man.age);就爱阅读www.92to.com网友整理上传,为您提供最全的知识大全,期待您的分享,转载请注明出处。
来源: http://www.92to.com/bangong/2017/04-07/20086501.html