閱讀335 返回首頁    go 阿裏雲 go 技術社區[雲棲]


設為首頁代碼,夠用實用

加入收藏夾,設為首頁代碼

把以下代碼加入<Body>相應位置:

<a target=_top href="javascript:window.external.addFavorite('https://it.alipea.com','阿裏it學院,IT資源分享站');">加入收藏</a>
<a  href='#' onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('https://it.alipea.com');">設為首頁</a>


鼠標指向時提示設為首頁


將下列代碼插入<body>區中:

<A href=https://it.alipea.com target="_blank">設為首頁</A>


打開頁麵時自動彈出窗口詢問是否設為首頁

將以下代碼放在<head></head>之間:

<script language="javascript">
function myhomepage(){
this.homepage.style.behavior='url(#default#homepage)';this.homepage.sethomepage('https://it.alipea.com');
}
</script>
<p align="center"><a href=https://it.alipea.com name="homepage"
></a>

再將下麵代碼加入<body>內:


即:<body >


離開時自動提示設為首頁

替換<body>標簽為:
<body onunload="BASEBody.style.behavior='url(#default#homepage)';if(!(BASEBody.isHomePage('https://it.alipea.com')))BASEBody.setHomePage('https://it.alipea.com/');">

最後更新:2017-04-03 12:53:57

  上一篇:go nginx 配置404、500、502等錯誤頁
  下一篇:go Android曆史版本