jquery版本为3.1.1,使用ajaxfileupload.js,结果报错 url.indexOf is not a function 进去查看,应该是调用jquery的load方法出错, ajaxfileupload中是 jQuery('#' + frameId).load(uploadCallback );
Breaking change: .load(), .unload(), and .error() removed
These methods are shortcuts for event operations, but had several API limitations. The event .load() method conflicted with the ajax .load() method. The .error() method could not be used with window.onerror because of the way the DOM method is defined. If you need to attach events by these names, use the .on() method, e.g. change $("img").load(fn) to $("img").on("load", fn).
好吧…全都用.on绑定就可以了
url.indexOf is not a function
说的是url这个对象的问题,建议贴更详细的报错。
今天也遇到了这个问题,查了一下文档,确实从3.0开始移除了load、unload、error事件方法。不过依然可以用on方法绑定这些事件。
https://jquery.com/upgrade-gu...
你好,我和你遇到了同样的问题。
请问,怎么on绑定呢,我对jQuery不熟悉,刚刚开始学习,谢谢。