添加到收藏的函数

<script type="text/javascript">
function addbookmark()
{
    var bookmarkName = "zijinguang";
    var url = " http://www.cnblogs.com/zijinguang"
    if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt
        (navigator.appVersion) >= 4))
        window.external.AddFavorite(url, bookmarkName );
    else if (navigator.appName == "Netscape")
        window.sidebar.addPanel(bookmarkName , url, '');
    else
        alert("Sorry!Cann't Add this site to your favorite!.");
}
</script>

你可能感兴趣的:(函数)