看不到原网站的,只根据理解改了下,你看看吧
<html>
<head>
  <title>Check Age</title>
  <meta http-equiv="content-type" content="text/html; charset=gb2312">
<style type="text/css">
.name div.text{
    float:left;
    width:118px;
    font-size:12px;
    text-align:right;
    font-weight:bold;
    }
.name div.redstar {
float:right;
width:10px;
font-size:12px;
text-align:right;
font-weight:normal;
color:#ff0000;
margin-right:3px;
}
div.input{
width:257px;
text-align:left;
float:left;
font-size:12px;
}
div.note{
width:310px;
float:right;
text-align:left;
font-size:12px;
color:#999999;
padding:3px;
line-height:130%;
background:#ffffff;
border:#ffffff 1px solid;
}
div.notetrue{
width:310px;
float:right;
text-align:left;
font-size:12px;
padding:3px;
line-height:130%;
color:#485E00;
background:#F7FFDD;
border:#485E00 1px solid;
}
div.noteawoke{
        display: none;
width:310px;
float:right;
text-align:left;
        font-size:12px;
        color:#ff0000;
padding:3px;
line-height:130%;
background:#fff5d8;
border:#ff7300 1px solid;
background-repeat:no-repeat;
background-position:2 3px;
margin:0px;
}
div.noteright{
        display: none;
width:310px;
float:right;
text-align:left;
        font-size:12px;
        color:#485E00;
padding:3px;
line-height:130%;
background:#00ff00;
border:#ff7300 1px solid;
background-repeat:no-repeat;
background-position:2 3px;
margin:0px;
}
</style> </head>
 <body>
 <table>
    <tr>
        <td class="name"><div class="text"><font color="blue" id=txtAgeFlag style="display:none;">√</font>年龄</div><div class="redstar">*</div></td>
        <td><div class="input"><input type="text" id="txtAge" /><div></td>
        <td><div class="note" id="divTipInfo"></div><div class="noteawoke" id="divAlarmInfo"></div><div class="noteright" id="divRightInfo"></div></td>
    </tr>
    
    <tr>
        <td class="name"><div class="text"><font color="blue" id=passNameFlag style="display:none;">√</font>用户名</div><div class="redstar">*</div></td>
        <td><div class="input"><input type="text" id="passName" /><div></td>
        <td><div class="note" id="divshowmsg"></div><div class="noteawoke" id="diverrmsg"></div><div class="noteright" id="divcorrmsg"></div></td>
    </tr>
 </table>
 
 
<script type="text/javascript">
var promptArray = new Array();
promptArray[0] = new Array("请输入 3-200 之间的数字!","请输入正确的数字","填写正确");//年龄提示信息
promptArray[1] = new Array("4-20 个字符(仅限大小写字母,数字,下划线等)","请输入正确的用户名","填写正确");//用户名提示信息
<!--
//检查年龄
var oAge = document.getElementById("txtAge");
var oNote = document.getElementById("divTipInfo");
var oAlarm = document.getElementById("divAlarmInfo");
var oRight = document.getElementById("divRightInfo");
var oTxtAgeFlag = document.getElementById("txtAgeFlag");
oNote.innerHTML = promptArray[0][0];
oAlarm.innerHTML = promptArray[0][1];
oRight.innerHTML = promptArray[0][2];oAge.onfocus = function()
{
    oNote.className = "notetrue";
}
oAge.onblur = function()
{
    if (this.value != "")
    {
        var numAge = parseInt(this.value);
        if (isNaN(numAge) || !(numAge>=3 && numAge<=200))
        {
            oAlarm.style.display = "block";
            oNote.style.display = "none";
            oRight.style.display = "none";
            oTxtAgeFlag.style.display = "none";
        }
        else
        {
            this.value = numAge;
            oAlarm.style.display = "none";
            oRight.style.display = "block";
            oTxtAgeFlag.style.display = "";            oNote.className = "note";
            oNote.style.display = "none";
        }
    }
    else
    {
        oAlarm.style.display = "none";
        oRight.style.display = "none";
        oTxtAgeFlag.style.display = "none";        oNote.className = "note";
        oNote.style.display = "block";
    }
}//检查用户名
var opassName = document.getElementById("passName");
var odivshowmsg = document.getElementById("divshowmsg");
var odiverrmsg = document.getElementById("diverrmsg");
var odivcorrmsg = document.getElementById("divcorrmsg");
var opassnameflag = document.getElementById("passNameFlag");
odivshowmsg.innerHTML = promptArray[1][0];
odiverrmsg.innerHTML = promptArray[1][1];
odivcorrmsg.innerHTML = promptArray[1][2];opassName.onfocus = function()
{
    odivshowmsg.className = "notetrue";
}
opassName.onblur = function()
{
    if (this.value != "")
    {
     if (/^[a-z0-9_]*$/g.test(this.value))
     {
     odiverrmsg.style.display = "none";
     odivshowmsg.style.display = "none";
     odivcorrmsg.style.display = "block";
     opassnameflag.style.display = "";
     }
     else
     {
     odiverrmsg.style.display = "block";
     odivshowmsg.style.display = "none";
     odivcorrmsg.style.display = "none";
     opassnameflag.style.display = "none";
     }
    }else{
    odiverrmsg.style.display = "none";
    odivcorrmsg.style.display = "none";
    opassnameflag.style.display = "none";    odivshowmsg.className = "note";
    odivshowmsg.style.display = "block";
    }
}
//-->
</script>
 </body>
</html>