我已经创建了我的jQuery自定义插件;
(function($){
$.fn.userForm = function(){
var element = this;
var UserDataObj = {
name:"John",
email:"john@example.com",
phone:"9999999999",
desc:"some description"
}
this.supports_html5_storage = function()
{
};
this.saveFormData = function(param)
{
}
if (this.supports_html5_storage())
{
}
else
{
}
};
})(jQuery);
现在我正试图在我的插件中调用一个方法;
var myPlugin = new $.fn.userForm();
myPlugin.saveFormData(".formFieldUserData");
由于某种原因,执行时IE中的代码中断 var myPlugin = new $ .fn.userForm();
如何解决此问题?