这只是一个警告:你的代码仍然有效,但可能不会在今后的工作中使用这个方法,因为它已经过时了。 可以参考这里: relevant source of Chromium 和 corresponding patch.
这个警告已经在 jQuery 1.11 里确认并且修复了。jQuery 1.4或者之前版本也不会报这个警告 (可以看 这里 和 这里).
1 | if (!event.preventDefault) { |
2 | event.preventDefault = function () { |
3 | event.returnValue = false ; //ie |
4 | }; |
5 | } |