Die Methode touppercase () wird verwendet, um eine Schnur in Großbuchstaben umzuwandeln.
Eine neue Zeichenfolge, in der alle Kleinbuchstaben von StringObject in Großbuchstaben konvertiert werden.
Die Syntax ist: StringObject.touppercase ()
Beispiel
In diesem Fall "Hallo Welt!" wird in Großbuchstaben angezeigt:
<script type = "text/javaScript"> var str = "Hello World!" Dokument.Write (Str.ToUppercase ()) </script>
Die Effekte sind wie folgt:
Verwandte Methoden sind wie folgt:
<html> <body> <script type = "text/javaScript"> var txt = "Hallo Welt!" Dokument.Write ("<p> big:" + txt.big () + "</p>") document.write ("<p> klein:" + txt.small () + "</p>") document.write ("<p> biot:" + txt () + ") +) document. "</p>") document.write ("<p> italic:" + txt.italics () + "</p>") document.write ("<p> blink:" + txt.blink () + "(funktioniert nicht in IE) </p>") document.write ("<p> Fixed:" + txt.fixed () + " +"). txt.strike () + "</p>") document.write ("<p> fontColor:" + txt.fontcolor ("rot") + "</p>"). "</p>") document.write ("<p> Großbuchstaben:" + txt.touppercase () + "</p>") document.write ("<p> einschriften:" + txt.sub () + "</p>") document.write ("<p> Supscript:" + txt.sup () + ") </p>") </p> "). txt.link (// www.vevb.com) + "</p>") </script> </body> </html>Die Effekte sind wie folgt:
Das obige ist der gesamte Inhalt dieses Artikels. Ich hoffe, es wird für das Lernen aller hilfreich sein und ich hoffe, jeder wird Wulin.com mehr unterstützen.