String.toLowerCase()

書式

文字列オブジェクト.toLowerCase()

説明

英文字を小文字にした結果を返します。文字列に記号や日本語が含まれている場合でも正しく処理されます。

サンプルコード [実行]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
</head>
<body>
<script type="text/javascript"><!--
str = new String("Sample text");
document.write(str.toLowerCase());
// --></script>
</body>
</html>