VBScript LCase 函数



LCase

LCase 函数在将输入字符串转换成小写字母后返回字符串。

语法

Lcase(String)

示例

<!DOCTYPE html>
<html>
   <body>
      <script language = "vbscript" type = "text/vbscript">
         var = "Microsoft VBScript"
         document.write("Line 1 : " & LCase(var) & "<br />")
         
         var = "MS VBSCRIPT"
         document.write("Line 2 : " & LCase(var) & "<br />")
         
         var = "microsoft"
         document.write("Line 3 : " & LCase(var) & "<br />")
      </script>
   </body>
</html>

当您将其另存为 .html 并在 Internet Explorer 中执行时,上述脚本将生成以下结果 -

Line 1 : microsoft vbscript
Line 2 : ms vbscript
Line 3 : microsoft
vbscript_strings.htm
广告