<script>
function chkIt(frm){
  if (frm.n1.value.length>0&&frm.n1.value.match(/[\x01-\xFF]*/)==false){
    alert('n1不能输入中文!')
    frm.n1.focus();
    return false;
  }
}
</script>
<body>
<form onsubmit="return chkIt(this)">
<input name="n1">
<input name="n2">
<input name="smt" type="submit" value="提交">
</form>
</body>

 

 

<input onpaste="return false;" type="text" name="textfield" style="width:400px; ime-mode:disabled" value="">

 

相关文章:

  • 2021-09-21
  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-27
  • 2021-12-26
  • 2022-12-23
猜你喜欢
  • 2021-06-29
  • 2021-05-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-04
相关资源
相似解决方案