转自:https://www.cnblogs.com/liluping860122/archive/2013/05/25/3099103.html<script type="text/javascript" language="javascript"> document.onkeyup = function (event) { var e = event || window.event; var keyCode = e.keyCode || e.whic
IE使用'propertychange'事件监听,其它浏览器使用'input'事件测试了IE7-10, Chrome, FF, 输入没有问题.♥但在IE9下, 删除, 回退, Ctrl+X 没有监听到! var $input = $('#textinput'); var $span = $('#num'); var customLength = 40; var pressHandle = function(){ var txtLen = $input.val().length; if (t