idcbe.com
Tag: 判断预览模式: 普通 | 列表

ASP判断字符串是否带有中文的函数

ASP判断中文字符串

<%'判断输入是否带有中文 有则返回"true",无则返回"false"
function HasChinese(str)
HasChinese=false
dim i
for i=1 to Len(str)
if Ascw(Mid(str,i,1))<0 or Ascw(Mid(str,i,1))>255 then
HasChinese=true
exit for
end if
next
end function
%>

Tags: ASP 中文字符串 判断 函数

分类:日志文章 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 9931