久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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)站

      jquery中大寫怎么轉小寫

      方法:1、利用toLowerCase()方法,語法為“需要轉小寫的字符.toLowerCase()”;2、利用toLocaleLowerCase()方法,語法為“需要轉小寫的字符.toLocaleLowerCase()”。

      jquery中大寫怎么轉小寫

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

      jquery中大寫怎么轉小寫

      1、toLowerCase() 方法用于把字符串轉換為小寫。

      語法

      string.toLowerCase()

      示例如下:

      <html> <head> <meta charset="utf-8"> <title>123</title> </head> <body> <script> var txt="ABCDEFGhijklmn"; document.write(txt.toLowerCase() + "<br>"); document.write(txt.toUpperCase()); </script> </body> </html>

      輸出結果:

      jquery中大寫怎么轉小寫

      拓展知識:

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

      語法為:

      string.toUpperCase()

      2、toLocaleLowerCase() 方法

      toLocaleLowerCase() 方法根據(jù)本地主機的語言環(huán)境把字符串轉換為小寫。

      本地是根據(jù)瀏覽器的語言設置來判斷的。

      通常,該方法與 toLowerCase() 方法返回的結果相同,只有幾種語言(如土耳其語)具有地方特有的大小寫映射。

      語法為:

      string.toLocaleLowerCase()

      示例如下:

      <html> <head> <meta charset="utf-8"> <title>123</title> </head> <body> <p>點擊按鈕將字符串轉換為小寫。</p> <button onclick="myFunction()">點我</button> <p id="demo"></p> <script> function myFunction() {   var str = "ABCDEFGhijklmn";   var res = str.toLocaleLowerCase();   document.getElementById("demo").innerHTML = res; } </script> </body> </html>

      輸出結果:

      jquery中大寫怎么轉小寫

      拓展知識:

      toLocaleUpperCase() 方法根據(jù)本地主機的語言環(huán)境把字符串轉換為大寫。

      相關視頻教程推薦:jQuery視頻教程

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