监听textarea文本框文本输入情况

// When the value of the text area changes...
$("textarea").on("input", function() {
  // If there's at least one character...
  if ($(this).val().length > 0) {
    // Enable the button.
    $("button").prop("disabled", false);
  } else {
    // Else, disable the button.
    $("button").prop("disabled", true);
  }
});
$('input').bind('input propertychange', function() { 
 //进行相关操作 
});

http://www.jb51.net/article/60789.htm

原文地址:https://www.cnblogs.com/zhangwei595806165/p/5270138.html