jQuery:错误 - matchExpr [type] .exec不是函数 [英] jQuery: Error - matchExpr[type].exec is not a function
本文介绍了jQuery:错误 - matchExpr [type] .exec不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我今天遇到了这个错误。互联网上可能指向正确方向的资源非常稀缺。
I was running against this error today. Resources on the internet that could point me in the right direction were very scarce.
基本上,在编写了一些JavaScript函数之后,所有在选择器上运行的jQuery方法都将导致错误:
Basically, after writing some JavaScript functions, all of jQuery's methods running on selectors would resuld in this error:
matchExpr[type].exec is not a function
推荐答案
之所以发生这种情况,是因为我扩展了 Object.prototype
。这打破了jQuery中的所有循环功能。在这里阅读更多内容: Object.prototype是禁止的。
The reason this happened, is because I had extended Object.prototype
. This breaks all looping functionality in jQuery. Read more here: Object.prototype is verboten.
这篇关于jQuery:错误 - matchExpr [type] .exec不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文