帮我解释一下代码var regAction = (function(){})()
var regAction = (function(){ var defaultOpts = {'regform':'regfrom', 'username':'username', 'userpwd':'userpwd', 'confirmpwd':'confirmpwd', 'checkcode':'checkcode', 'accept':'accept', 'errorTrips':'errorTrips', 'channel':'channel' };//以下省略N行代码})() regAction.init({'regform': 'regform','username': 'email','errorTrips': 'erroInfo','userpwd': 'pwd','confirmpwd': 're-pwd','accept': 'chkaccpet','checkcode': 'checkcode'}); //初始化var regAction = (function(){ var defaultOpts = {'regform':'regfrom', 'username':'username', 'userpwd':'userpwd', 'confirmpwd':'confirmpwd', 'checkcode':'checkcode', 'accept':'accept', 'errorTrips':'errorTrips', 'channel':'channel' };//以下省略N行代码})()
[解决办法]
1. var regAction = (function(){})() 匿名函数,不是什么jQuery的用法
2. 你省略的代码有个return, 你自己看下