input 限制输入类型(Input restrict input type).docVIP

  • 25
  • 0
  • 约6.71千字
  • 约 9页
  • 2017-08-16 发布于河南
  • 举报

input 限制输入类型(Input restrict input type).doc

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

文档评论(0)

1亿VIP精品文档

相关文档