zoukankan      html  css  js  c++  java
  • jquery监听div、input、textarea内容变化

    第一种:change事件

    change事件在元素的值发生变化时触发,适用于input、textarea、select

    $("#demo").bind("change", function(){
        alert('a');
    });

    第一种:DOMNodeInserted事件(插入事件)、DOMNodeInserted事件(移除事件)

    DOMNodeInserted事件只有在插入节点时有效,相反DOMNodeRemoved事件,只有在移除节点时有效。
    $('#demo').bind('DOMNodeInserted', function() {
       alert('a') 
    })
    $('#demo').bind('DOMNodeRemoved', function() {
       alert('b') 
    })
  • 相关阅读:
    Vue
    linux-----docker
    linux基础
    Flask基础
    websocket
    css
    Mysql数据库基础
    IO多路复用
    线程和协程
    sh_02_del关键字
  • 原文地址:https://www.cnblogs.com/wangyongx/p/10711513.html
Copyright © 2011-2022 走看看