function strLength(str)
{
var realLength = 0, len = str.length, charCode = -1
for (var i = 0i <leni++)
{
charCode = str.charCodeAt(i)
if (charCode >= 0 &&charCode <= 128)
{
realLength += 1
}
else
{
realLength += 2
}
}
return realLength
}
SELECT * FROM zhuce WHERE LENGTH(user_yuanyin)>= 2length是一个函数,判断字符的长度,>=2 应该写在外面
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)