久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      javascript怎么將字符串轉(zhuǎn)換為大寫

      轉(zhuǎn)換方法:1、使用toUpperCase()函數(shù),語法“stringObject.toUpperCase()”;2、使用toLocaleUpperCase()函數(shù),語法“stringObject.toLocaleUpperCase()”。

      javascript怎么將字符串轉(zhuǎn)換為大寫

      本教程操作環(huán)境:windows7系統(tǒng)、javascript1.8.5版、Dell G3電腦。

      1、使用toUpperCase()函數(shù)將字符串轉(zhuǎn)換為大寫

      toUpperCase() 方法用于把字符串轉(zhuǎn)換為大寫。

      語法

      stringObject.toUpperCase()

      返回值

      一個新的字符串,在其中 stringObject 的所有小寫字符全部被轉(zhuǎn)換為了大寫字符。

      實例

      <script type="text/javascript"> var str="Hello World!" document.write(str.toUpperCase()) </script>

      輸出:

      HELLO WORLD!

      2、使用toLocaleUpperCase()函數(shù)將字符串轉(zhuǎn)換為大寫

      toLocaleUpperCase() 方法用于把字符串轉(zhuǎn)換為大寫。

      語法

      stringObject.toLocaleUpperCase()

      返回值

      一個新的字符串,在其中 stringObject 的所有小寫字符全部被轉(zhuǎn)換為了大寫字符。

      說明

      與 toUpperCase() 不同的是,toLocaleUpperCase() 方法按照本地方式把字符串轉(zhuǎn)換為大寫。只有幾種語言(如土耳其語)具有地方特有的大小寫映射,所有該方法的返回值通常與 toUpperCase() 一樣。

      實例

      <script type="text/javascript"> var str="Hello World!" document.write(str.toLocaleUpperCase()) </script>

      輸出:

      HELLO WORLD!

      【推薦學(xué)習(xí):javascript高級教程】

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號