jquery.validate.js内部错误"javaScript运行时错误:无法获取未定义或空引用的属性"调用" [英] Error inside jquery.validate.js "javaScript runtime error: Unable to get property 'call' of undefined or null reference"
问题描述
我正在处理一个asp.net mvc-5 Web应用程序.我正在使用这些脚本:-
I am working on an asp.net mvc-5 web application. and i am using these scripts:-
- jquery 1.10.2
- jquery-ui 1.8.24
- jQuery验证插件1.11.1
现在,当我在Visual Studio 2013中运行应用程序时,IE10上会发生以下异常,而chrome或firefox上不会有任何问题:-
Now when i run the application inside visual studio 2013, the following exception will happen on IE10 , while there will not be any problem on chrome or firefox :-
Unhandled exception at line 1234, column 5 in http://localhost:49392/Scripts/jquery.validate.js
0x800a138f - JavaScript runtime error: Unable to get property 'call' of undefined or null reference
将在jquery.validate.js内部引发错误的代码是:-
the code which will raise the error inside the jquery.validate.js is :-
function($) {
// only implement if not provided by jQuery core (since 1.4)
// TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs
if (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) {
$.each({
focus: 'focusin',
blur: 'focusout'
}, function( original, fix ){
$.event.special[fix] = {
setup:function() {
this.addEventListener( original, handler, true );
},
teardown:function() {
this.removeEventListener( original, handler, true );
},
handler: function(e) {
var args = arguments;
args[0] = $.event.fix(e);
args[0].type = fix;
return $.event.handle.apply(this, args);
}
};
function handler(e) {
e = $.event.fix(e);
e.type = fix;
**return $.event.handle.call(this, e);**//this will raise the exception
}
});
}
任何人都可以解决我的问题吗? 谢谢
Can anyone adivce how i can solve this problem ? Thank
推荐答案
安装jquery migration可能会解决此问题PM> Install-Package jQuery.Migrate
installing jquery migrate may solve this PM> Install-Package jQuery.Migrate
这篇关于jquery.validate.js内部错误"javaScript运行时错误:无法获取未定义或空引用的属性"调用"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!