久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      javascript如何刪除字符串中的空行

      javascript刪除字符串中的空行的方法:結(jié)合正則表達(dá)式來刪除,如【replace(/(n[st]*r*n)/g, 'n').replace(/^[nrnt]*|[nrnt]*$/g, '');…】。

      javascript如何刪除字符串中的空行

      本文操作環(huán)境:windows10系統(tǒng)、javascript 1.8.5、thinkpad t480電腦。

      我們可以利用正則表達(dá)式來實(shí)現(xiàn),一起來看下具體的實(shí)現(xiàn)代碼:

      String.prototype.removeBlankLines = function () {     return this.replace(/(n[st]*r*n)/g, 'n').replace(/^[nrnt]*|[nrnt]*$/g, '') }

      運(yùn)行結(jié)果:

      javascript如何刪除字符串中的空行

      推薦學(xué)習(xí):javascript視頻教程

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