“收藏本站” 的代码
网上很多的代码只能在IE中,这个代码能够在 IE 和火狐浏览器中通用。
<script type="text/javascript">
function addFavorite() {
var c = "http://sise.sinaapp.com/";
var b = "华软微博";
try {
window.external.AddFavorite(c, b)
} catch (d) {
window.sidebar.addPanel(b, c, "")
}
};
</script>
html 代码为:
<!-----------By Amolee---------添加收藏---------------------->
<a href='#' onClick="addFavorite();">收藏本站</a>