(function () {
    var box = new BlackBox(),
        demos = {
            popup_preview:function () {
                box.popup('<div class="popup_demo" style="text-align:center">' +
                    '加入购物车成功!<br><br><a href="#close_demo"  id="close_demo">继续购物</a> &nbsp; &nbsp; &nbsp;<a href="/member/SPcart.aspx">去购物车结算</a>',
                    function (content) {
                        content.find("#shake_demo").click(function () {
                            box.boxShake();
                        });
                        content.find("#close_demo").click(function () {
                            box.boxClose();
                        });
                    });
                }
        };
    $(document).ready(function () {        try{
            hljs.initHighlightingOnLoad();        }catch(e) {
            
        }           $("button[class=preview]").each(function () {
            var id = $(this).attr("id");
            if (demos[id]) {
                $(this).click(demos[id]);
            }
        })    })
}).call(window);<button class="preview" id="popup_preview">预览</button><a onclick="abc()" href="#">点击</a>现在点预览,功能是正常的, 想实现 点击超链接时,能调用一个ABC的JS函数   请教写法。 谢谢