<html>
<body>
<center>
<form name=thisform>
用户名:     <input type=text name=t1 size=20><br>
密码:      <input type=password name=t2 size=20><br>
密码确认:   <input type=password name=t3 size=21><br>
    <input type=button value=确定 onclick=pd><!--这里是调用下面的过程啊?--!>
</form>
</center>
<!--下面是一个过程--!>
<script language=vbscript>
sub pd()
if thisform.t1.value<>" " then
if len(thisform.t2.value)>6 then
if thisform.t2.value=thisform.t3.value then
msgbox "欢迎" & thisform.t1.value &"登陆"
else
msgbox "用户和密码输入不一致"
end if
else
msgbox "输入的密码少于6位"
end if
else
msgbox "用户名不能为空"
end if
end sub
</script>
</body>
</html>
上面为什么无法调用?为什么会提示网页错误?
<body>
<center>
<form name=thisform>
用户名:     <input type=text name=t1 size=20><br>
密码:      <input type=password name=t2 size=20><br>
密码确认:   <input type=password name=t3 size=21><br>
    <input type=button value=确定 onclick=pd><!--这里是调用下面的过程啊?--!>
</form>
</center>
<!--下面是一个过程--!>
<script language=vbscript>
sub pd()
if thisform.t1.value<>" " then
if len(thisform.t2.value)>6 then
if thisform.t2.value=thisform.t3.value then
msgbox "欢迎" & thisform.t1.value &"登陆"
else
msgbox "用户和密码输入不一致"
end if
else
msgbox "输入的密码少于6位"
end if
else
msgbox "用户名不能为空"
end if
end sub
</script>
</body>
</html>
上面为什么无法调用?为什么会提示网页错误?
后面为什么要加分号啊?
只是这样更规范一些你想简单就这样写把
<input type=button value=确定 onclick="pd()">
改成这样