- 27
- 0
- 约6.71千字
- 约 9页
- 2017-08-16 发布于河南
- 举报
input 限制输入类型(Input restrict input type)
input 限制输入类型(Input restrict input type)
Only 1. input and paste Chinese characters
input onkeyup= value=value.replace (/[^\u4E00-\u9FA5]/g ) onbeforepaste= (clipboardData.setDatatext, clipboardData.getData (text).Replace (/[^\u4E00-\u9FA5]/g)) br/
Only 3. digital input and paste
input onkeyup= this.value=this.value.replace (/\D/g ) onafterpaste= this.value=this.value.replace (/\D/g, /br/)
5. digital script
input onkeyup= if (/\D/.test (this.value)) {alert (this.value= can only enter numbers);}; br/
6. can only enter numbers and English
input onkeyup= value=value.replace (/[\W]/g ) onbeforepas
您可能关注的文档
- const用法(Const usage).doc
- cookie用法整理(Cookie usage arrangement).doc
- cool edit 使用指南(Cool Edit使用指南).doc
- copy of gsm系统消息的介绍 x(Copy of GSM system message introduction x).doc
- cool 英语(酷英语).doc
- copy详细用法大全(Copy detailed usage Daquan).doc
- could you please clean your room 说课稿(请你打扫你的房间说课稿).doc
- co(有限公司).doc
- cpu与gpu的作用和位置分析(Role and position analysis of CPU and GPU).doc
- cpa考试中,如何一次性通过6门档(CPA test, how to pass through 6 files at one time).doc
原创力文档

文档评论(0)