<script language=vbscript> 'xm 姓名 function valiName(xm) ret =true for i =1tolen(xm) ifasc(mid(xm, i, 1)) >=0andasc(mid(xm, i, 1)) <=128then ret =false exitfor endif next valiName = ret end function 'mc 名称 'g 不能连续出现的英文字符 'h 不能连续出现的相同的中文字符 function valiNameContinuousChar(mc, g, h) c =0 : d =0 b =false last ="" for i =1tolen(mc) if last <>""and last =mid(mc, i, 1) then d = d +1 endif ifasc(mid(mc, i, 1)) >0then ifnot b then b =true endif c = c +1 if c >= g thenexitfor else b =false c =0 endif last =mid(mc, i, 1) next valiNameContinuousChar = c < g and d <= h -2 end function </script>