Touppercase()メソッドは、文字列を大文字に変換するために使用されます。
StringObjectのすべての小文字が大文字に変換される新しい文字列。
構文は次のとおりです。StringObject.touppercase()
例
この場合、「Hello World!」大文字で表示されます:
<script type = "text/javascript"> var str = "hello world!" document.write(str.touppercase())</script>
効果は次のとおりです。
関連方法は次のとおりです。
<html> <body> <スクリプトタイプ= "text/javascript"> var txt = "hello world!" document.write( "<p> big:" + txt.big() + "</p>")document.write( "<p> small:" + txt.small() + "</p> "</p>")document.write( "<p> italic:" + txt.italics() + "</p>")document.write( "<p> blink:" + txt.blink() + "(ieで動作しない)</p>")document.write( "<p> sixt:" + txt.fixed( "</p>" txt.strike() + "</p>")document.write( "<p> fontcolor:" + txt.fontcolor( "red") + "</p>")document.write( "<p> fontsize:" + txt.fontsize(16) + "</p>")文書( "</p>")document.write( "<p>大文字:" + txt.touppercase() + "</p>")document.write( "<p> subscript:" + txt.sub() + "</p>")document.write( "<p> supscript:" + txt.sup() + "</p>" <p> txt.link(// www.vevb.com) + "</p>")</scrip> </body> </html>
効果は次のとおりです。
上記はこの記事のすべての内容です。みんなの学習に役立つことを願っています。誰もがwulin.comをもっとサポートすることを願っています。