回复 1# 的帖子
<script language="javascript">
function a_mima(){document.form1.pwd2.value="";document.getElementById("mimaa").innerHTML="";}
function a_mima_1(a){
if(document.form1.pwd.value.toLowerCase()==a.value.toLowerCase()){
document.getElementById("mimaa").innerHTML="<font color='red'>---
正确</font>";
}else{
document.getElementById("mimaa").innerHTML="<font color='red'>---
密码不一致</font>";
a.value="";
}
}
</script>
<td><input type="password" name="pwrd"
onKeyUp="this.value=this.value.replace(/[^\u4E00-\u9FA5\w]/g,'');a_mima()" />
<td><input type="password" name="pwd2" type="text" id="pwd2"
onChange="a_mima_1(this)"/></td>
<span id="mimaa"></span>
你这样试试!!它会在<td>后面显示!!