<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div class="input-choseNum">
<input type="text" id="zw" οnblur="zw()"/>
<span class="sureChoose">确定</span><span class="closeChoose">取消</span>
</div>
</body>
<script type="text/javascript">
function zw(){
var zw = document.getElementById('zw').value;
if((/[\u4E00-\u9FA5]/i.test(zw))){
alert("不能输入中文");
return false;
}
}
</script>
</html>
转载于:https://www.cnblogs.com/nns4/p/7474013.html