toUpperCase方法以大写字母的形式返回字符串,这意味着它以大写字母返回字符串。
此方法用于将小写字符串转换为大写字符串,这不需要任何参数。
JavaScript 字符串 toUpperCase方法示例
<html> <head> <title>JavaScript 字符串 toUpperCase() 方法示例</title> </head> <body> <script type="text/javascript"> var str = "Onitroad is a good website"; document.write(str.toUpperCase( )); </script> </body> </html>
日期:2020-04-18 01:09:24 来源:oir作者:oir