input 只允许输入数字 js

来源:互联网 发布:足球比赛视频分析软件 编辑:程序博客网 时间:2024/05/13 18:34

只能是数字<input onkeyup="value=value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">



原文链接:http://hi.baidu.com/freegoodman/item/bdcd9b3af913eff797f88ddb

原创粉丝点击