页面控制键盘输入正整数

<input type="text" onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                        onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />

 

posted @ 2013-08-05 17:11  hellocjr  阅读(373)  评论(0编辑  收藏  举报