- 注册时间
- 2013-3-27
- 最后登录
- 2013-4-19
- 阅读权限
- 20
- 积分
- 87
- 精华
- 0
- 帖子
- 31
|
贴代码出来吧:
首先是外部调用的:
function userlogin(){
socket.emit('userregisters',{ username: "112233",userpass:"415252"});
var didi = gameInit();
console.log(didi.dodo())
}
在gameInit()里面,我加了一个return,如下:
return {
dodo:function ok(){
alert("执行dodo");
bibao();
}
}
其中bibao()为gameInit里的一个函数,执行的时候错误:
Uncaught TypeError: Cannot read property 'objectindex' of null lufylegend-1.7.0.js:514
removeChild lufylegend-1.7.0.js:514
gameInit main.js:46
userlogin index.html:27
p.mouseEvent lufylegend-1.7.0.js:2074
p.mouseEvent lufylegend-1.7.0.js:2059
p.mouseEvent lufylegend-1.7.0.js:2059
LGlobal.mouseEvent lufylegend-1.7.0.js:351
(anonymous function)
|
|