久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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怎么修改瀏覽器title

      javascript修改title的方法:1、使用“document.getElementsByTagName("title")[0].innerText='值';”語句來修改。2、使用“document.title='值';”語句來修改。

      javascript怎么修改瀏覽器title

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

      title在html中屬于特殊的節(jié)點(diǎn)元素,使用javascript修改title?下面本篇文章給大家介紹一下修改方法。

      方法1:innerText 方式

      document.getElementsByTagName("title")[0].innerText = '需要設(shè)置的值';

      方法2:document.title方式

      經(jīng)過測(cè)試,還可通過document.title 設(shè)置title的值。

      console.log(document.title);      # 可以獲取title的值。 document.title = '需要設(shè)置的值';    # 設(shè)置title的值。

      例子

      window.onfocus = function () {  document.title = '恢復(fù)正常了...'; }; window.onblur = function () {  document.title = '快回來~頁面崩潰了'; };

      我們?cè)跒g覽器取得了焦點(diǎn)和失去焦點(diǎn)的時(shí)候改變title的值,可以發(fā)現(xiàn)切換瀏覽器選項(xiàng)卡的時(shí)候,title發(fā)生了改變。

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