久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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中如何將url轉(zhuǎn)換成漢字

      在javascript中,可以使用unescape()函數(shù)、decodeURIComponent()函數(shù)和decodeURI()函數(shù)將url轉(zhuǎn)換成漢字。

      javascript中如何將url轉(zhuǎn)換成漢字

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

      相關(guān)函數(shù)

      轉(zhuǎn)為url格式 轉(zhuǎn)為漢字
      escape(key) unescape(key)
      encodeURI(key) decodeURI(key)
      encodeURIComponent(key) decodeURIComponent(key)

      介紹

      最多使用的應(yīng)為encodeURIComponent,它是將中文、韓文等特殊字符轉(zhuǎn)換成utf-8格式的url編碼,所以如果給后臺(tái)傳遞參數(shù)需要使用encodeURIComponent時(shí)需要后臺(tái)解碼對(duì)utf-8支持(form中的編碼方式和當(dāng)前頁面編碼方式相同)。

      escape不編碼字符有69個(gè):*,+,-,.,/,@,_,0-9,a-z,A-Z。

      encodeURI不編碼字符有82個(gè):!,#,$,&,',(,),*,+,,,-,.,/,:,;,=,?,@,_,~,0-9,a-z,A-Z。

      encodeURIComponent不編碼字符有71個(gè):!, ',(,),*,-,.,_,~,0-9,a-z,A-Z。

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

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