写出来了,呵呵
<html>
<head>
<script language="javascript">
function checkData()
{
if(document.all.txtAccount.value=="1")
{
alert("正确");
return true;
}
if(document.all.txtAccount.value=="5")
{
alert("正确");
return true;
}
if(document.all.txtAccount.value=="")
{
alert("您的输入不能为空");
return false;
}
else
{
alert("您的输入不正确");
} } </script>
</head><body>
<input type="text" name="txtAccount" size=15><br><br>
<input type="button" value="验证" onClick="checkData()">
</body></html>
<html>
<head>
<script language="javascript">
function checkData()
{
if(document.all.txtAccount.value=="1")
{
alert("正确");
return true;
}
if(document.all.txtAccount.value=="5")
{
alert("正确");
return true;
}
if(document.all.txtAccount.value=="")
{
alert("您的输入不能为空");
return false;
}
else
{
alert("您的输入不正确");
} } </script>
</head><body>
<input type="text" name="txtAccount" size=15><br><br>
<input type="button" value="验证" onClick="checkData()">
</body></html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货