<script type="text/javascript"> document.onkeydown=function() { if (event.keyCode == 8) { if (document.activeElement.type == "text"||document.activeElement.type == "textarea"||document.activeElement.type == "password") { if (document.activeElement.readOnly == false) return true; } return false; } } </script>
js处理backspace键
最新推荐文章于 2024-06-27 13:24:02 发布