<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>只能输入中文</title>
</head>
<body>
<input type="text" id="text" onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))">
</body>
</html>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
  • 2021-10-20
猜你喜欢
  • 2021-08-01
  • 2021-08-01
  • 2021-09-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案