標籤:
1、文字js指令碼事件:<span onClick="var strHref=window.location.href;this.style.behavior=’url(#default#homepage)’;this.setHomePage(‘http://www.unvs.cn’);" style="CURSOR: hand">
2、文字連結事件:<a href="#" onClick="window.external.addFavorite(‘http://blog.unvs.cn’,‘Unvs部落格’)"title=Unvs部落格’ >
<input type=button value=匯入收藏夾 onclick=window.external.ImportExportFavorites(true,"http://www.unvs.cn/");>
<input type=button value=匯出收藏夾 onclick=window.external.ImportExportFavorites(false,"http://www.unvs.cn/");>
<input type=button value=整理收藏夾 onclick="window.external.ShowBrowserUI(‘OrganizeFavorites’, null)">
<input type=button value=查看源檔案 onclick="window.location = ‘view-source:’+ window.location.href">
<input type=button value=語言設定 onclick="window.external.ShowBrowserUI(‘LanguageDialog’, null)">
<input type=button value=加入收藏夾 onclick="window.external.AddFavorite(‘http://www.fsing.net/’, ‘風信子網路’)">
<input type=button value=加入到頻道 onclick="window.external.addChannel(‘http://www.fsing.net/’)">
<input type=button value=設成首頁 onclick="this.style.behavior=’url(#default#homepage)’;this.setHomePage(‘http://www..****..com/’)">
3、給一個網站上設定"設為首頁"和"加入收藏夾"的代碼應該怎麼寫?(在一個小圖片上面加)
<A href="#" onmouseover="window.external.addFavorite(‘http://www.****.com/’,‘e時區特色論壇’)" target="_self" >收藏本頁</A>
<a href="#" onmouseover="this.style.behavior=’url(#default#homepage)’;this.setHomePage(‘http://www.****.com/’);" target="_self">設為首頁</a>
4、用javascript來實現,寫在控制項的onclick中
網上查的javascript例子(onclick中是具體的實現)<table align="center">
<tr>
<td onclick="window.location.href;this.style.behavior=’url(#default#homepage)’;this.setHomePage(‘http://blog.unvs.cn/‘);" style="CURSOR:Hand"><font color=black>設為首頁 </font></td>
<td onclick="window.external.AddFavorite(location.href,document.title);" style="CURSOR:Hand"><font color=black>加入收藏</font></td>
</tr>
</table>
設為首頁
<A href=# onclick="this.style.behavior=’url(#default#homepage)’;this.setHomePage(‘http://www.baidu.com’);">圖片</A>
—————————————–
加如收藏
<A href="javascript:window.external.AddFavorite(‘http://www.baidu.com’,‘百度’)">圖片</A>
加入收藏
<a href="javascript:window.external.AddFavorite(‘http://www.baidu.com’,‘百度’)">加入收藏</a>
首頁
<span onclick="var strHref=window.location.href;this.style.behavior=’url(#default#homepage)’;this.setHomePage(‘http://www.baidu.com’);" style="CURSOR: hand"><br>設為首頁</br></span>
<a href=# onClick="this.style.behavior=’url(#default#homepage)’;this.setHomePage
(‘http://www……/’);">設為首頁</a> <IMG height=11
src="images/dot.gif" width=12 border=0> <a href=# onClick="window.external.addFavorite(‘http://www……/’,‘****’);return(false)">收藏本站</a>
將其中"www……"換成你的網頁地址
"****"換成你的網站名字
ASP.NET中怎樣將頁面設為首頁,加入收藏