87,922
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<script type="text/javascript">
function a(obj){
var val=obj.value;
var reg=/[\d~!@#$%^&*()_+|:?><\"|{}\[\]\?;\:\'\|\\]/
if(reg.test(val)){
alert("This text is wrong!");
}
}
</script>
<body>
<input type="text" onblur="a(this);"/>
</body>
</html>