This article describes the usage of the toUpperCase method of js. Share it for your reference. The specific analysis is as follows:
Definition and usage:
The toUpperCase() method is used to convert a string to uppercase.
grammar:
stringObject.toUpperCase()
Return value:
A new string in which all lowercase characters of stringObject are converted to uppercase characters.
Example:
In this case, "Hello world! VeVB.COM" will be displayed in capital letters:
Copy the code as follows:<script type="text/javascript">
var str="Hello World! VeVB.COM"
document.write(str.toUpperCase())
</script>
The effect is as follows: HELLO WORLD! JB51.NET
I hope this article will be helpful to everyone's JavaScript programming.