标签:fine on() new his 修改属性 define 属性 def OLE
1. 动态添加属性,方法
var object = new Object();
object.name = "name";
object.age = 19;
>>>{name: "name", age: 19}
object.fun = function(){
console.log("这是一个测试")
}
object.fun()
2.修改属性
object.name=”tom”;
object.alert=function(){
alert(“hello,”+this.name);
}
3.删除属性
object.name = undefined
object.age = undefined
标签:fine on() new his 修改属性 define 属性 def OLE
原文地址:https://www.cnblogs.com/yang-xiansen/p/10109845.html