Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何修复jquery.fn.init.jquery中未定义的jquery url.indexOf函数?_Jquery_Asp.net Mvc - Fatal编程技术网

如何修复jquery.fn.init.jquery中未定义的jquery url.indexOf函数?

如何修复jquery.fn.init.jquery中未定义的jquery url.indexOf函数?,jquery,asp.net-mvc,Jquery,Asp.net Mvc,我使用jQuery在MVC中开发了一个web应用程序 现在我一次又一次地犯这个错误。我不知道我现在错过了什么 有人能给我指点一下吗 它在浏览器控制台中抛出以下错误消息: 延迟异常:url.indexOf不是函数类型错误:url.indexOf不是函数 在jQuery.fn.init.jQuery.fn.load() 在HTMLDocument。() 在mightThrow() 在进程()未定义jQuery.Deferred.exceptionHook@jQuery-3.1.1.js:3846 j

我使用jQuery在MVC中开发了一个web应用程序

现在我一次又一次地犯这个错误。我不知道我现在错过了什么

有人能给我指点一下吗

它在浏览器控制台中抛出以下错误消息:

延迟异常:url.indexOf不是函数类型错误:url.indexOf不是函数

在jQuery.fn.init.jQuery.fn.load()
在HTMLDocument。()
在mightThrow()
在进程()未定义jQuery.Deferred.exceptionHook@jQuery-3.1.1.js:3846
jquery-3.1.1.js:3855未捕获类型错误:url.indexOf不是函数
在jQuery.fn.init.jQuery.fn.load(jQuery-3.1.1.js:9793)
在HTMLDocument。(main.js:27)
在mightThrow(jquery-3.1.1.js:3570)
at流程(jquery-3.1.1.js:3638)


使用
jquery3.x
时,库中出现了一些突破性的更改

Jquery完全删除了
加载
卸载
错误
事件监听器,尽管早在
Jquery 1.8
中就不推荐它们了


使用上的注册您的活动。

谢谢谢卡。但是如果我想使用这些Window.load函数,我应该如何使用then呢$(窗口).load(函数(){'use strict';var$portfolio_selectors=$('.portfolio filter>li>a');var$portfolio=$('.portfolio items');$portfolio.同位素({itemselectors:'.portfolio item',layoutMode:'fitRows'});$portfolio_selectors.on('click',function(){$portfolio_selectors.remove('active);$(this.addClass('active');var selector=$(this.attr('data-filter');$portfolio.isotophet({filter:selector});return false;});
$(window).on('load',function(){//your code here});