SoFunction
Updated on 2025-02-28

js add favorite code (compatible with ie/ff/op)


var www_jb51_net = function (obj, url, title) {
    var e = || [0];
    var B = {
        IE : /MSIE/.test() && !
        , FF : /Firefox/.test()
        , OP : !!
    };
    = null;
    if () {
        ("onmouseup", function () {
            try {
                (url, title);
                = false;
            } catch (exp) {}
        });
    } else {
        if ( || () == "a") {
            ("rel", "sidebar"), = title, = url;
        } else if () {
            var a = ("a");
            = "sidebar", = title, = url;
            (a, obj);
            (obj);
            a = null;
        }
    }
};
<a href="javascript:void(0);return false;" onMouseDown="www_jb51_net(this, 'https://', ​​'I am a professional website construction resource, script programming learning website in China')">Favorite me</a>