nullJavascript中创建对象的五种方法实例
复制代码 代码如下: script type="text/javascript" // 方法一 var p0 = new Object(); p0.name = "xy"; p0.age = 20; p0.sayName = function() { alert(this.name); } p0.showAgeAfterSomeYears = functi...
复制代码 代码如下: script type="text/javascript" // 方法一 var p0 = new Object(); p0.name = "xy"; p0.age = 20; p0.sayName = function() { alert(this.name); } p0.showAgeAfterSomeYears = functi...