控制input只能输入数字

<input onkeyup="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
posted @ 2011-04-10 18:32  moretop  阅读(281)  评论(0编辑  收藏  举报