用VBScript对文本框变量的长度判断
sub aa()
Dim pwd,num
pwd=password.value
num=Len(pwd)
if num>10 then
msgbox"密码长度不能大于10个字符"
end if
end sub
<input name="password" type="password">
--------------------------------------------------
pwd=password.value 获取文本框(password)变量值应该怎么写啊?
用 if num>10 then 来判断num的值是否大于10 这么写可以吗?
还有 如果同时判断两个密码长度是否大于10可以直接用两个变量来判断吗?比如:
if num1>10 or num2>10 then
msgbox"密码长度不能大于10个字符"