日期:2014-05-16 浏览次数:20385 次
var objClass3 = {
myname: "objClass",
lable: "abc"+myname//myname未定义
}
var objClass3 = {
myname: "objClass",
lable: function(){
return "abc"+this.myname
}
}
alert( objClass3.lable() )
var objClass3 = {
myname: "objClass",
lable: (function(){return "abc"+this.myname}).call(objClass3)
}
alert(objClass3.lable)