js 直接验证;不让用户输入

onkeyup="value=value.replace(/[^\d]/g,'')"
onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
posted @ 2017-07-27 20:19  he0xff  阅读(210)  评论(0编辑  收藏  举报