// 使用JS测试字符串中的字母是大写还是小写
let mes1 = 'a';
let mes2 = 'A';
if(mes1 == mes1.toLowerCase()){
console.log('lowerCase') //小写
}
if(mes1 == mes1.toUpperCase()){
console.log('upperCase') //大写
}
使用JavaScript测试字符串中的字母是大写还是小写
最新推荐文章于 2024-05-04 18:44:22 发布