返回一個字符串,該字符串中的字母被轉(zhuǎn)換為小寫字母。
strVariable.toLowerCase( ) "String Literal".toLowerCase( )
toLowerCase 方法對非字母字符不會產(chǎn)生影響。
下面的示例演示了 toLowerCase 方法的效果:
var strVariable = "This is a STRING object";
strVariable = strVariable.toLowerCase( )
;
在執(zhí)行上一條語句后 strVariable 的值為:
this is a string object
String 對象的方法 | String 對象的屬性 | toUpperCase 方法
應(yīng)用于:String 對象