zoukankan      html  css  js  c++  java
  • jquery3.0移除了.load()方法

    参考链接:新版jquery去掉load事件了吗?

    今天也遇到了这个问题,查了一下文档,确实从3.0开始移除了load、unload、error事件方法。不过依然可以用on方法绑定这些事件。
    
    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).

    就是说以前直接$(obj).load(),现在被改为$(obj).on('load',fn)了,好吧~

  • 相关阅读:
    Brupsuite 中插件CO2的使用
    记事本默认编码改为UTF-8
    Crackme031
    Crackme030
    Crackme029
    Crackme028
    Crackme026
    Crackme025
    Crackme024
    Crackme022
  • 原文地址:https://www.cnblogs.com/zjfblog/p/8334132.html
Copyright © 2011-2022 走看看