久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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怎么將浮點數(shù)轉為整數(shù)

      轉換方法:1、使用parseInt()函數(shù),語法“parseInt(浮點數(shù))”;2、利用位運算符“|”,語法“0 | 浮點數(shù)”;3、利用位運算符“^”,語法“0 ^ 浮點數(shù)”;4、利用位運算符“~~”,語法“~~浮點數(shù)”。

      javascript怎么將浮點數(shù)轉為整數(shù)

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

      javascript將浮點數(shù)轉為整數(shù)的方法

      方法1:使用parseInt()函數(shù)

      parseInt(13.5); parseInt(22.5);

      javascript怎么將浮點數(shù)轉為整數(shù)

      方法2:利用位運算符“|”

      console.log(0 | 123.45)

      javascript怎么將浮點數(shù)轉為整數(shù)

      方法3:利用位運算符“^”

      console.log(0 ^ 123.45)

      javascript怎么將浮點數(shù)轉為整數(shù)

      方法4:利用位運算符“~~”

      console.log(~~ 123.45); console.log(~~ 123.4545);

      javascript怎么將浮點數(shù)轉為整數(shù)

      【推薦學習:javascript高級教程】

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