يتم استخدام طريقة ToupperCase () لتحويل سلسلة إلى أقصى.
سلسلة جديدة يتم فيها تحويل جميع الأحرف الصغيرة من StringObject إلى أحرف كبيرة.
بناء الجملة هو: StringObject.ToupperCase ()
مثال
في هذه الحالة ، "مرحبا العالم!" سيتم عرضها في رسائل رأس المال:
<script type = "text/javaScript"> var str = "Hello World!" document.write (str.touppercase ()) </script>
الآثار هي كما يلي:
الطرق ذات الصلة هي كما يلي:
<html> <body> <script type = "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 ( txt.strike () + "</p>") document.write ("<p> fontcolor:" + txt.fontcolor ("Red") + "</p>") document.write ("<p> fontsize:" + txt.fontsize (16) + "</p>") document.write ( "</p>") document.write ("<p> uppercase:" + txt.touppercase () + "</p>") document.write ("<p> substrict:" + txt.sub () + "</p>") document.write ( txt.link (// www.vevb.com) + "</p>") </script> </body> </html>الآثار هي كما يلي:
ما سبق هو كل محتوى هذه المقالة. آمل أن يكون ذلك مفيدًا لتعلم الجميع وآمل أن يدعم الجميع wulin.com أكثر.