久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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中writeln和write的區(qū)別是什么

      javascript中writeln和write的區(qū)別:writeln()方法在瀏覽器中輸出數(shù)據(jù)時,會在數(shù)據(jù)末尾添加一個換行符,進(jìn)行換行;而write()方法在瀏覽器中輸出數(shù)據(jù)時,不會在數(shù)據(jù)末尾添加一個換行符,因而不能換行。

      javascript中writeln和write的區(qū)別是什么

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

      javascript提供了兩種方式來在瀏覽器中直接顯示數(shù)據(jù)??梢允褂?write( ) 和 writeln( ),這兩個函數(shù)是document 對象的方法。

      writeln( ) 方法與 write( ) 方法幾乎一樣,差別僅在于是Write不能夠換行,Writeln能夠換行。

      writeln( ) 將在所提供的任何字符串后添加一個換行符。而write()方法不會在字符串末尾添加一個換行符。

      注:在網(wǎng)頁中是看不到writeln的換行效果的,它是被瀏覽器表現(xiàn)為一個空格顯示出來了。

      javascript中writeln和write的區(qū)別是什么

      在HTML文件和JSP的源文件中都看不到效果,讀者能夠在標(biāo)簽中加入預(yù)格式標(biāo)簽查看效果,瀏覽器

          <script>       document.write("<pre>write");       document.writeln("writln");       document.write("write</pre>");     </script>

      也能夠用open方法從新打開一個窗口來查看測試

      <script>  with(window.open()){  document.write("write")  document.writeln("writeln")  document.writeln("write")  } </script>

      而后在彈出的窗口中查看網(wǎng)頁源文件,就可看到效果。

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