- <script language=vbscript>
- function regtest(str)
- Set re = New RegExp
- re.Pattern = "^.{0,2}$|.{21,}|^[^A-Za-z0-9/u4E00-/u9FA5]|[^/w/u4E00-/u9FA5.-]|([_.-])/1"
- if re.Test(str) then
- msgbox("不符合")
- else
- msgbox("符合")
- end if
- end function
- </script>
- <input id=strs value="a_a.a_a.a_a-a-a_a-a" size=40>
- <input type=button onclick=regtest(strs.value) value="检查">
新闻热点
疑难解答