UCase
将输入的字符串转换为大写字母后,UCase函数将返回字符串。
语法
UCase(String)
例
<!DOCTYPE html> <html> <body> <script language = "vbscript" type = "text/vbscript"> var = "Microsoft VBScript" document.write("Line 1 : " & UCase(var) & "<br />") var = "MS VBSCRIPT" document.write("Line 2 : " & UCase(var) & "<br />") var = "microsoft" document.write("Line 3 : " & UCase(var) & "<br />") </script> </body> </html>
将其另存为.html并在Internet Explorer中执行时,上述脚本将产生以下结果:
Line 1 : MICROSOFT VBSCRIPT Line 2 : MS VBSCRIPT Line 3 : MICROSOFT
作者:terry,如若转载,请注明出处:https://www.web176.com/vbscript/1216.html