2004/07/28 | 不能输入中文函数
类别(JScript) | 评论(0) | 阅读(45) | 发表于 15:32
相关代码:
Function isRegisterUserName(s)
Set regEx = New RegExp
regEx.Pattern = "[^ -}]"
regEx.IgnoreCase = True
regEx.Global = True
isRegisterUserName = regEx.Test(s)
End Function

Function isvalid(form)
xm = form.xm.value
if Not isRegisterUserName(xm) Then
alert "This could not input Chinese"
Else
isvalid = True
End If
End Function
0

评论Comments

日志分类
首页[102]
.Net[11]
VBScript[1]
JScript[51]
XML[3]
HTML&CSS[9]
ASP[8]
ActiveX[4]
Software[10]
Other[5]