[摘要]请选择城市信息'注:级联菜单第1项当selectedIndex!=0时,第2项第3项被禁用!无须检查其他两项'当级联菜单第1项selectedIndex==0时,第2项的select...
请选择城市信息
'注:级联菜单第1项当selectedIndex!=0时,第2项第3项被禁用!无须检查其他两项
'当级联菜单第1项selectedIndex==0时,第2项的selectedIndex不能为0,第二项的selectedIndex!=0时,第3项的selectedIndex也不能为0
'此项用于检查国家/省/市三项级联菜单,当国家不为中国时,省市可不填,为中国时,必须填写省以及相对的市!
findJS="if (document."&frmName&"."&tmpArr(i+3)&".selectedIndex ==0)"&vbCrlf&_
"{"&vbCrlf&_
"if (document."&frmName&"."&tmpArr(i)&".selectedIndex ==0)"&vbCrlf&_
"{"&vbCrlf&_
"window.alert('"&tmpArr(i+2)&"');"&vbCrlf&_
"document."&frmName&"."&tmpArr(i)&".focus;"&vbCrlf&_
"return false;"&vbCrlf&_
"}"&vbCrlf&_
"else if (document."&frmName&"."&tmpArr(i)&".selectedIndex != 0)"&vbCrlf&_
"{"&vbCrlf&_
"if (document."&frmName&"."&tmpArr(i+4)&".selectedIndex == 0)"&vbCrlf&_
"{"&vbCrlf&_
"window.alert('"&tmpArr(i+5)&"');"&vbCrlf&_
"document."&frmName&"."&tmpArr(i+4)&".focus;"&vbCrlf&_
"return false;"&vbCrlf&_
"}"&vbCrlf&_
"}"&vbCrlf&_
"}"&vbCrlf
Exit Function
Case "16" '确认未被禁用的Select类型必须选择 格式:检查的表单项
关键词:ASP动态生成的javascript表单验证代码