ASP检测字符串是否有汉字
点击:620
发布时间:
ASP检测字符串是否有汉字。示例如下:
测试字符串“2008年北京奥运会”中各字符是否为汉字:
mychar="2008年北京奥运会" for i=1 to len(mychar) a=mid(mychar,i,1) if abs(asc(a))>127 then response.write a & "是一个汉字"&chr(10) else response.write a & "不是一个汉字"&chr(10) end if next