foxtable代码:
wb.AddForm("","form1","wczhuce.htm").Attribute = = "onsub mit='retu rn zhuce()'""
With wb.AddInputGroup("form1","ipg1","<lable style='font-size:16px;color: #0000CD '>请填入用户注册信息</lable>")
.AddInput("xingming","姓名: ","text").Placeholder = "请输入姓名"
. AddInput("mima","请输入密码: ","text").Placeholder = "请输入密码"
. AddInput("shouji","请输入手机号码: ","number")
With wb.AddButtonGroup("form1","btg1",False)
.Add("btn1", "注册", "submit")
.Add("btn2","退出","button","logon.htm")
End With
With wb.AddPageFooter("","pf1","Copyright © 2022-2026 版权所有:liujie6215")
.Attribute = "style='position: static;'"
End With
End With
e.WriteString(wb.Build) '生成网页
js代码:
function zhuce(){
var v1 = document.getElementById("xingming").value;
var v2 = document.getElementById("mima").value;
var v3 = document.getElementById("shouji").value;
if (v1.length>3)
if (v2.length>6)
if (v3.length==11){return true}
else
show("toptip3",2000);
else
show("toptip2",2000);
else
show("toptip1",2000);
return false;
}
出现的问题是:如:v1我无论输入任何大于3位内容,都会出现toptip1的提示,而且不输入内容是会跳转下一页,麻烦老师给指点一下啊。
我相要的结果是:内容小于相应字符长度会提示,手机号最好匹配正确的手机号,不仅仅是位数够数。
[此贴子已经被作者于2023/2/1 10:32:30编辑过]