请帮助我。当我在 ASP.NET MVC 中使用 jQuery
时出现错误。
Uncaught TypeError: ((x.event.special[i.origType] || (intermediate value)).handle || i.handler).apply is not a function Uncaught TypeError: ((x.event.special[i.origType] || (intermediate value)).handle || i.handler).apply is not a function
导致此问题的代码是:
$('#btnClick').click(function(){ //code })
最佳答案
在我的例子中,错误是由于将事件绑定(bind)到不存在的函数而引起的。我删除了我不知道与事件绑定(bind)的函数。
请参阅下面的代码片段:
var foo = {
bar1: function(){
alert('working');
}
};
// Working
$('body').on('click', '.my-button', foo.bar1);
// Not Working because bar2 doesn't exist
$('body').on('click', '.my-button', foo.bar2);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<span class="my-button">Click me</span>
它将产生:
Uncaught TypeError: ((n.event.special[g.origType] || (intermediate value)).handle || g.handler).apply is not a function
关于jquery - 未捕获的类型错误 : ((x. event.special[i.origType] || (中间值)).handle || i.handler).apply 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32231036/