VBScript UCase 函數

定義和用法

UCase 函數可把指定的字符串轉換為大寫。

提示:請參閱 LCase 函數。

語法

UCase(string)
參數 描述
string 必需的。需被轉換為大寫的字符串。

實例

例子 1

dim txt
txt="This is a beautiful day!"
document.write(UCase(txt))

輸出:

THIS IS A BEAUTIFUL DAY!

例子 2

dim txt
txt="This Is a Beautiful Day!"
document.write(UCase(txt))

輸出:

THIS IS A BEAUTIFUL DAY!