我已经定义了下面的JavaScript对象:使JavaScript对象全球对
var WealthyLaughingDuckControl = {
users: [],
setUsers: function(new_users) {
this.users = new_users;
}
};
我想它是可用的铬/ Firebug的JavaScript控制台内:
> WealthyLaughingDuckControl
// console result goes here
在现在,我得到:
> ReferenceError: WealthyLaughingDuckControl is not defined
我该怎么做?
你有页面我们可以看到吗?也请告诉我你在$(document).ready语句中没有这个对象 –
糟糕...它用'$(document).ready(function(){':/ ... ...)封装,感谢你的帮助! – ducin