站内搜索:
首页 >> 前端 >> 内容
JQuery监听标签内容变化

时间:2017/3/31 9:13:00

JQuery监听标签内容变化:监听p这种标签的内容变化,使用DOMNodeInserted。

$(".intro_selected").find("font").bind('DOMNodeInserted', function () {
    var aa = $(".intro_selected").find("font").html();
    if(aa.length > 0){
        $(".intro_selected").removeClass('ui-state-highlight highlight-red');
    }
});
监听input的值变化,用input porpertychange
$("input").bind('input porpertychange', function () {
//$("input").bind('blur', function () {
    //var value = this.value.trim();
    //if(value.length>0) {
        //value = Number(value);
        //if(!isNaN(value)/*typeof value === Number*/){
            getSumGrade();
        //}
    //}
});

  • 上一篇:通过ajax请求后台返回两个List拼装table
  • 下一篇:react中fetch之cors跨域请求
  • 返回顶部