使用方法
<body> Input: <input type="text" id="input"><br> <textarea id="log" readonly></textarea> <script src="jquery.min.js"></script> <script src="jquery.splendid.textchange.js"></script> <script> $("#input").on("textchange", function() {
//do something... var value = this.value; $("#log").val(function(i, oldLog) { return oldLog + "textchange, value: " + value + "\n"; }); }); </script> </body>
附上插件链接