摘要: 1、input只能输入数字<input onkeyup="value=value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />2、设置input为只读属性并且让input框没有光标<input type="text" name="b" on 阅读全文
posted @ 2012-12-28 14:47 totoro118 阅读(222) 评论(0) 推荐(0)