function IsLetter(str){
var rc=true;
if (str+"" == "undefined" || str == null){
rc=false;
} else {
for(i=0;i<str.length;i++) {
if((str.charAt(i)>'Z' && str.charAt(i)<'a')||str.charAt(i)<'A' || str.charAt(i)>'z'){
rc=false;
break;
}
}
}
return rc;
}
检查是否全为字母
最新推荐文章于 2022-01-19 17:18:24 发布