function testchar(t0,t1)
checkOK = t0
checkStr = t1
allValid = True
For i = 1 to len(checkStr)
ch = Mid(checkStr, i, 1)
If (InStr(checkOK, ch) = 0) Then
allValid = False
Exit For
End If
Next
If (Not allValid) Then
testchar=true
else
testchar=false
End If
end function
function wyts_onsubmit()
Set theForm = document.wyts
if testchar("0123456789-",theForm.lxdh.value) then
MsgBox "在 联系电话 域中,只能输入数字字符及-。", 0, "有效性验证错误"
theForm.lxdh.focus()
wyts_onsubmit = False
Exit Function
End If
wyts_onsubmit = True
End Function