真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

javascript如何修改瀏覽器title方法

這篇文章主要介紹javascript如何修改瀏覽器title方法,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!

創(chuàng)新互聯(lián)建站專注于都蘭網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠為您提供都蘭營銷型網(wǎng)站建設(shè),都蘭網(wǎng)站制作、都蘭網(wǎng)頁設(shè)計(jì)、都蘭網(wǎng)站官網(wǎng)定制、成都微信小程序服務(wù),打造都蘭網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供都蘭網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。

title在html中屬于特殊的節(jié)點(diǎn)元素.因?yàn)樗梢允褂胐ocument.getElementsByTagName("title")[0]來獲取網(wǎng)頁的title標(biāo)簽,但卻無法用document.getElementsByTagName("title")[0].innerHtml用更改它的值。經(jīng)測(cè)試原生js有兩種方式可以修改,jQuery中也能簡(jiǎn)單設(shè)置。不清楚的小伙伴們可以了解一下。

innerText 方式

通過console.log(document.getElementsByTagName("title")[0]),發(fā)現(xiàn)能打印出標(biāo)簽,標(biāo)簽里面只有文字節(jié)點(diǎn),故猜測(cè)只能識(shí)別TextNode,所以用innerText方式設(shè)置title的值,果然成功了。</p><pre>document.getElementsByTagName("title")[0].innerText = '需要設(shè)置的值';</pre><p>document.title方式</p><p>經(jīng)過測(cè)試,還可通過document.title 設(shè)置title的值。</p><pre>console.log(document.title);      # 可以獲取title的值。 document.title = '需要設(shè)置的值';    # 設(shè)置title的值。</pre><p>例子</p><pre>window.onfocus = function () {  document.title = '恢復(fù)正常了...'; }; window.onblur = function () {  document.title = '快回來~頁面崩潰了'; };</pre><p>我們?cè)跒g覽器取得了焦點(diǎn)和失去焦點(diǎn)的時(shí)候改變title的值,可以發(fā)現(xiàn)切換瀏覽器選項(xiàng)卡的時(shí)候,title發(fā)生了改變。</p><p>jQuery方式</p><p>當(dāng)然如果你的項(xiàng)目里面依賴jQuery,可以使用jq的方法設(shè)置</p><pre>$('title').html('') $('title').text('')</pre><p>jq中兩種方式都可以實(shí)現(xiàn)</p><p>總結(jié)</p><p>原生js中我們可以通過 innerText , document.title 兩種方式動(dòng)態(tài)修改網(wǎng)頁的title .</p><p>jq中我們可以通過 $('title').html('') 或者 $('title').text('') 進(jìn)行修改。</p><p>以上是“javascript如何修改瀏覽器title方法”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!</p> <br> 當(dāng)前題目:javascript如何修改瀏覽器title方法 <br> 本文網(wǎng)址:<a href="http://weahome.cn/article/pocssc.html">http://weahome.cn/article/pocssc.html</a> </div> </div> </div> <div id="squ6kqw" class="other container"> <h3>其他資訊</h3> <ul> <li> <a href="/article/jeeedp.html">深入理解MySQL主從原理專欄發(fā)布</a> </li><li> <a href="/article/jeeeei.html">angularjs和nodejs有哪些區(qū)別</a> </li><li> <a href="/article/jeeedj.html">怎么使用PHP編寫訪問量計(jì)數(shù)器</a> </li><li> <a href="/article/jeeeos.html">動(dòng)態(tài)代理知識(shí)總結(jié)</a> </li><li> <a href="/article/jeeeid.html">如何使用Kubernetes健康檢查</a> </li> </ul> </div> <div id="squ6kqw" class="footer"> <div id="squ6kqw" class="foota container"> <div id="squ6kqw" class="foot_nav fl col-lg-8 col-md-8 col-sm-12 col-xs-12"> <ul> <li id="squ6kqw" class="col-lg-3 col-md-3 col-sm-3 col-xs-6"> <h3>網(wǎng)站制作</h3> <a target="_blank">成都網(wǎng)站制作</a><a target="_blank">手機(jī)網(wǎng)站制作</a><a target="_blank">綿陽網(wǎng)站制作</a><a target="_blank">成都網(wǎng)站制作</a><a target="_blank">成都網(wǎng)站制作</a><a target="_blank">移動(dòng)手機(jī)網(wǎng)站制作</a> </li> <li id="squ6kqw" class="col-lg-3 col-md-3 col-sm-3 col-xs-6"> <h3>企業(yè)服務(wù)</h3> <a target="_blank">網(wǎng)絡(luò)文化經(jīng)營許可證</a><a target="_blank">商標(biāo)注冊(cè)</a><a target="_blank">免費(fèi)收錄網(wǎng)站</a><a target="_blank">買友情鏈接</a><a target="_blank">軟文營銷</a><a target="_blank">分類目錄網(wǎng)站</a> </li> <li id="squ6kqw" class="col-lg-3 col-md-3 col-sm-3 col-xs-6"> <h3>網(wǎng)站建設(shè)</h3> <a target="_blank">大橙子網(wǎng)站建設(shè)</a><a target="_blank">高端網(wǎng)站建設(shè)</a><a target="_blank">重慶企業(yè)網(wǎng)站建設(shè)</a><a target="_blank">成都網(wǎng)站建設(shè)</a><a target="_blank">上市企業(yè)網(wǎng)站建設(shè)方案</a><a href="http://weahome.cn/" target="_blank">重慶網(wǎng)站建設(shè)</a> </li> <li id="squ6kqw" class="col-lg-3 col-md-3 col-sm-3 col-xs-6"> <h3>服務(wù)器托管</h3> <a target="_blank">重慶電信五里店機(jī)房托管</a><a target="_blank">重慶電信水土機(jī)房托管</a><a target="_blank">樂山服務(wù)器托管</a><a target="_blank">綿陽機(jī)房托管</a><a target="_blank">IDC機(jī)房托管</a><a target="_blank">成都機(jī)柜租用</a> </li> </ul> </div> <div id="squ6kqw" class="footar fl col-lg-4 col-md-4 col-sm-12 col-xs-12"> <p>全國免費(fèi)咨詢:</p> <b>400-028-6601</b> <p>業(yè)務(wù)咨詢:028-86922220 / 13518219792</p> <p>節(jié)假值班:18980820575 / 13518219792</p> <p>聯(lián)系地址:成都市太升南路288號(hào)錦天國際A幢1002號(hào)</p> </div> </div> <div id="squ6kqw" class="footb"> <div id="squ6kqw" class="copy container"> <div id="squ6kqw" class="fl">Copyright ? 成都創(chuàng)新互聯(lián)科技有限公司重慶分公司 <a target="_blank">渝ICP備2021005571號(hào)</a></div> <!--<div id="squ6kqw" class="fr"><a target="_blank">成都網(wǎng)站建設(shè)</a>:<a target="_blank">創(chuàng)新互聯(lián)</a></div>--> </div> </div> <div id="squ6kqw" class="link"> <div id="squ6kqw" class="container"> 友情鏈接:: <a target="_blank">成都網(wǎng)站建設(shè)</a> <a target="_blank">重慶網(wǎng)站建設(shè)</a> <a href="">四川網(wǎng)站建設(shè)</a> <a href="">重慶建設(shè)網(wǎng)站</a> <a target="_blank">移動(dòng)服務(wù)器托管</a> <a target="_blank">成都服務(wù)器托管</a> <a target="_blank">云服務(wù)器</a> <a target="_blank">廣告設(shè)計(jì)制作</a> <a target="_blank">重慶網(wǎng)頁設(shè)計(jì)</a> <a target="_blank">重慶做網(wǎng)站</a> <a target="_blank">重慶網(wǎng)站制作</a> <a href="">重慶網(wǎng)站建設(shè)</a> <a href="">重慶網(wǎng)站公司</a> <a href="">渝中網(wǎng)站制作</a> <a href="">重慶網(wǎng)站設(shè)計(jì)</a> </div> </div> </div> <div id="squ6kqw" class="foot"> <ul class="public-celan"> <li> <a target="_blank" class="a1 db tc"> <img src="/Public/Home/img/icon-23.png" alt="" class="db auto"> <span id="squ6kqw" class="span-txt">在線咨詢</span> </a> </li> <li> <a href="tel:18980820575" class="a1 db tc"> <img src="/Public/Home/img/icon-24.png" alt="" class="db auto"> <span id="squ6kqw" class="span-txt">電話咨詢</span> </a> </li> <li> <a target="_blank" href="tencent://message/?uin=1683211881&Site=&Menu=yes" class="a1 db tc"> <img src="/Public/Home/img/icon-25.png" alt="" class="db auto"> <span id="squ6kqw" class="span-txt">QQ咨詢</span> </a> </li> <li> <a target="_blank" href="tencent://message/?uin=532337155&Site=&Menu=yes" class="a1 db tc public-yuyue-up"> <img src="/Public/Home/img/icon-26.png" alt="" class="db auto"> <span id="squ6kqw" class="span-txt">預(yù)約顧問</span> </a> </li> </ul> </div> <div id="squ6kqw" class="customer"> <dl class="icon1"> <dt> <a href="tencent://message/?uin=1683211881&Site=&Menu=yes"> <i class="iconT"><img src="/Public/Home/img/QQ.png" alt=""></i> <p>在線咨詢</p> </a> </dt> </dl> <dl class="icon2"> <dt><i><img src="/Public/Home/img/weixin.png" alt=""></i><p>微信咨詢</p></dt> <dd><img src="/Public/Home/img/ewm.png"></dd> </dl> <dl class="icon3"> <dt><i><img src="/Public/Home/img/dianhua.png" alt=""></i><p>電話咨詢</p></dt> <dd> <p>028-86922220(工作日)</p> <p>18980820575(7×24)</p> </dd> </dl> <dl class="icon4"> <dt class="sShow"> <a href="tencent://message/?uin=244261566&Site=&Menu=yes"> <i><img src="/Public/Home/img/dengji.png" alt=""></i><p>提交需求</p> </a> </dt> </dl> <dl class="icon5"> <dt class="gotop"> <a href="#top"> <i><img src="/Public/Home/img/top.png" alt=""></i><p>返回頂部</p> </a> </dt> </dl> </div> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://weahome.cn/" title="真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆">真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆</a> <div class="friend-links"> </div> </div> </footer> <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body><div id="hlr1n" class="pl_css_ganrao" style="display: none;"><strong id="hlr1n"></strong><label id="hlr1n"><label id="hlr1n"><th id="hlr1n"><b id="hlr1n"></b></th></label></label><var id="hlr1n"></var><u id="hlr1n"><ruby id="hlr1n"></ruby></u><font id="hlr1n"></font><ol id="hlr1n"><i id="hlr1n"><listing id="hlr1n"><tt id="hlr1n"></tt></listing></i></ol><ol id="hlr1n"><optgroup id="hlr1n"></optgroup></ol><var id="hlr1n"><small id="hlr1n"></small></var><form id="hlr1n"><output id="hlr1n"><sub id="hlr1n"><div id="hlr1n"></div></sub></output></form><div id="hlr1n"></div><span id="hlr1n"><thead id="hlr1n"><dfn id="hlr1n"><u id="hlr1n"></u></dfn></thead></span><dfn id="hlr1n"><mark id="hlr1n"></mark></dfn><output id="hlr1n"><sub id="hlr1n"></sub></output><progress id="hlr1n"><acronym id="hlr1n"><style id="hlr1n"><var id="hlr1n"></var></style></acronym></progress><ruby id="hlr1n"></ruby><output id="hlr1n"><sub id="hlr1n"><div id="hlr1n"><ol id="hlr1n"></ol></div></sub></output><strike id="hlr1n"></strike><track id="hlr1n"><dfn id="hlr1n"><mark id="hlr1n"><span id="hlr1n"></span></mark></dfn></track><legend id="hlr1n"><style id="hlr1n"><mark id="hlr1n"><small id="hlr1n"></small></mark></style></legend><var id="hlr1n"></var><output id="hlr1n"></output><legend id="hlr1n"><acronym id="hlr1n"><style id="hlr1n"><nobr id="hlr1n"></nobr></style></acronym></legend><style id="hlr1n"><nobr id="hlr1n"></nobr></style><progress id="hlr1n"><style id="hlr1n"><mark id="hlr1n"><small id="hlr1n"></small></mark></style></progress><nobr id="hlr1n"></nobr><thead id="hlr1n"><thead id="hlr1n"></thead></thead><font id="hlr1n"><meter id="hlr1n"><pre id="hlr1n"><strike id="hlr1n"></strike></pre></meter></font><label id="hlr1n"><label id="hlr1n"><th id="hlr1n"><b id="hlr1n"></b></th></label></label><rp id="hlr1n"><font id="hlr1n"></font></rp><acronym id="hlr1n"><style id="hlr1n"></style></acronym><label id="hlr1n"></label><video id="hlr1n"><em id="hlr1n"></em></video><p id="hlr1n"><var id="hlr1n"></var></p><strong id="hlr1n"></strong><ins id="hlr1n"></ins><dfn id="hlr1n"><u id="hlr1n"></u></dfn><menuitem id="hlr1n"><span id="hlr1n"></span></menuitem><ins id="hlr1n"><pre id="hlr1n"></pre></ins><style id="hlr1n"><th id="hlr1n"></th></style><pre id="hlr1n"><p id="hlr1n"><var id="hlr1n"><form id="hlr1n"></form></var></p></pre><var id="hlr1n"><form id="hlr1n"></form></var><u id="hlr1n"><mark id="hlr1n"></mark></u><legend id="hlr1n"><sup id="hlr1n"><label id="hlr1n"><th id="hlr1n"></th></label></sup></legend><sub id="hlr1n"><div id="hlr1n"></div></sub><label id="hlr1n"><strong id="hlr1n"></strong></label><ol id="hlr1n"></ol><em id="hlr1n"><div id="hlr1n"></div></em><menuitem id="hlr1n"><span id="hlr1n"></span></menuitem><pre id="hlr1n"><strike id="hlr1n"><var id="hlr1n"><optgroup id="hlr1n"></optgroup></var></strike></pre><style id="hlr1n"></style><small id="hlr1n"><ins id="hlr1n"></ins></small><i id="hlr1n"><listing id="hlr1n"><dfn id="hlr1n"><mark id="hlr1n"></mark></dfn></listing></i><thead id="hlr1n"><legend id="hlr1n"></legend></thead><progress id="hlr1n"><pre id="hlr1n"><p id="hlr1n"><var id="hlr1n"></var></p></pre></progress><dfn id="hlr1n"><menuitem id="hlr1n"></menuitem></dfn><ol id="hlr1n"></ol><sub id="hlr1n"><div id="hlr1n"></div></sub><form id="hlr1n"><video id="hlr1n"><em id="hlr1n"><big id="hlr1n"></big></em></video></form><strike id="hlr1n"></strike><div id="hlr1n"></div><form id="hlr1n"></form><menuitem id="hlr1n"><span id="hlr1n"></span></menuitem><big id="hlr1n"><dl id="hlr1n"></dl></big><u id="hlr1n"></u><font id="hlr1n"><legend id="hlr1n"></legend></font><ruby id="hlr1n"></ruby><menuitem id="hlr1n"><span id="hlr1n"></span></menuitem><dfn id="hlr1n"><mark id="hlr1n"></mark></dfn><progress id="hlr1n"></progress><u id="hlr1n"><ruby id="hlr1n"><thead id="hlr1n"><legend id="hlr1n"></legend></thead></ruby></u><i id="hlr1n"><dfn id="hlr1n"><dfn id="hlr1n"><ruby id="hlr1n"></ruby></dfn></dfn></i><font id="hlr1n"><progress id="hlr1n"><acronym id="hlr1n"><style id="hlr1n"></style></acronym></progress></font><output id="hlr1n"><sub id="hlr1n"><div id="hlr1n"><ol id="hlr1n"></ol></div></sub></output><tt id="hlr1n"><menuitem id="hlr1n"><form id="hlr1n"><thead id="hlr1n"></thead></form></menuitem></tt><strong id="hlr1n"><pre id="hlr1n"><track id="hlr1n"><tt id="hlr1n"></tt></track></pre></strong><rp id="hlr1n"><b id="hlr1n"></b></rp><sub id="hlr1n"><strike id="hlr1n"></strike></sub><meter id="hlr1n"></meter><em id="hlr1n"></em><pre id="hlr1n"><track id="hlr1n"></track></pre><tt id="hlr1n"><span id="hlr1n"><form id="hlr1n"><dfn id="hlr1n"></dfn></form></span></tt><b id="hlr1n"><progress id="hlr1n"></progress></b><mark id="hlr1n"></mark><sub id="hlr1n"></sub><meter id="hlr1n"><pre id="hlr1n"></pre></meter><dfn id="hlr1n"><u id="hlr1n"></u></dfn><pre id="hlr1n"></pre><output id="hlr1n"><em id="hlr1n"><div id="hlr1n"><ol id="hlr1n"></ol></div></em></output><div id="hlr1n"><span id="hlr1n"><legend id="hlr1n"><listing id="hlr1n"></listing></legend></span></div><dfn id="hlr1n"><u id="hlr1n"></u></dfn><video id="hlr1n"><em id="hlr1n"></em></video><strike id="hlr1n"><strong id="hlr1n"></strong></strike><pre id="hlr1n"></pre><i id="hlr1n"></i><font id="hlr1n"><progress id="hlr1n"><acronym id="hlr1n"><style id="hlr1n"></style></acronym></progress></font><dfn id="hlr1n"><u id="hlr1n"></u></dfn><legend id="hlr1n"><sup id="hlr1n"></sup></legend><font id="hlr1n"><meter id="hlr1n"><pre id="hlr1n"><strike id="hlr1n"></strike></pre></meter></font><ol id="hlr1n"><optgroup id="hlr1n"><video id="hlr1n"><em id="hlr1n"></em></video></optgroup></ol><meter id="hlr1n"><pre id="hlr1n"><p id="hlr1n"><var id="hlr1n"></var></p></pre></meter></div> </html> <script> $(".con img").each(function(){ var src = $(this).attr("src"); //獲取圖片地址 var str=new RegExp("http"); var result=str.test(src); if(result==false){ var url = "https://www.cdcxhl.com"+src; //絕對(duì)路徑 $(this).attr("src",url); } }); window.onload=function(){ document.oncontextmenu=function(){ return false; } } </script>