高手帮忙!
slyer 2006-05-22 08:08:32 <script language="VBScript" type="text/VBScript">
sub button1_onclick()
if trim(form1.nickname.value)="" or trim(form1.pwd.value)="" or trim(form1.pwd2.value)="" or trim(form1.email.value)="" or
trim(form1.area2.value)="" then
msgbox"标记*的项不能为空"
else
cha=trim(form1.nickname.value)
chalen=len(cha)
if chalen<3 or chalen>20 then
msgbox"用户名必须3—20位" :exit sub
for i=1 to chalen
ascii=asc(Mid(cha,i,1))
if not(ascii>=asc("A") and ascii<=asc("Z") or ascii>=asc("a") and ascii<=asc("z") or
ascii>=asc("0") and ascii<=asc("9")) then
MsgBox "用户名必须由数字和字母组成":exit sub
end if
next
document.form1.submit
end if
end if
end sub
</script>
为什么我在文本框中输入汉字没有错误信息提示?