var obj = { "s1" : "String --> s1", "f1" : function (){ alert("f1()"); }, "f2" : function (){ alert("f2()"); return true; } } obj.f1(); if(obj.f2()){ alert("f2() return true ."); } alert(obj.s1);
?
?创建对象的一种方法。
var obj = { "s1" : "String --> s1", "f1" : function (){ alert("f1()"); }, "f2" : function (){ alert("f2()"); return true; } } obj.f1(); if(obj.f2()){ alert("f2() return true ."); } alert(obj.s1);
?
?创建对象的一种方法。