本文實例講述了JS動態(tài)改變?yōu)g覽器標(biāo)題的方法。分享給大家供大家參考,具體如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head> <title>無標(biāo)題頁</title> <link id="link1" rel="Shortcut Icon" href="1.ico" /></head><body style="cursor:url(1.cur); height:100%;"><script type="text/javascript">var bo = true;var title = document.title;window.setInterval(function(){ document.title = (bo?'[信]':'[★]') + title; bo = !bo;},500);</script>設(shè)置為100毫秒時,火狐正常,IE、Chrome都不正常。</body></html>
這里注意:改變document.title的時間間隔設(shè)置為100毫秒時,火狐正常,IE、Chrome都不正常。
設(shè)置瀏覽器小圖標(biāo):
<link id="link1" rel="Shortcut Icon" href="1.ico" />
改變鼠標(biāo)樣式:
<body style="cursor:url(1.cur); ">
更多關(guān)于JavaScript相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《JavaScript+flash技巧與特效大全》、《JavaScript切換特效與技巧總結(jié)》、《JavaScript查找算法技巧總結(jié)》、《JavaScript動畫特效與技巧匯總》、《JavaScript錯誤與調(diào)試技巧總結(jié)》、《JavaScript數(shù)據(jù)結(jié)構(gòu)與算法技巧總結(jié)》、《JavaScript遍歷算法與技巧總結(jié)》及《JavaScript數(shù)學(xué)運(yùn)算用法總結(jié)》
希望本文所述對大家JavaScript程序設(shè)計有所幫助。
新聞熱點
疑難解答