• jquery || js把网站添加到收藏夹 狼


               //搜藏本站
                $("#storeWeb").click(function() {

                    var ctrl = (navigator.userAgent.toLowerCase()).indexOf('mac') != -1 ? 'Command/Cmd' : 'Ctrl';
                    if (document.all) {
                        window.external.addFavorite(window.location, document.title);
                    }
                    else if (window.sidebar) {
                        window.sidebar.addPanel(document.title, window.location);
                    }
                    else {
                        alert('添加失败,请用Ctrl+D进行添加');
                    }

                });

  • 相关阅读:
    Java线程面试题 Top 50
    抽象类
    this和super的区别
    引用传递
    【代码】递归调用
    java异常
    抽象类 final
    sublime使用技巧
    zabbix表达式
    tcpdump
  • 原文地址:https://www.cnblogs.com/gowhy/p/2087112.html
Copyright © 2020-2023  润新知