$(function () {
    //删除评论
    $("a[rel='del']").click(function () {
        var $delObject = $(this);
        if (confirm("确定要删除 [ " + $delObject.attr("title") + " ] 的关注吗？")) {
            $.ajax({
                type: "POST",
                url: "Ajax/Product.ashx",
                data: { 'com': 'delattention', 'aid': $delObject.attr("href"), 'realname': $delObject.attr("title") },
                datatype: "json",
                beforeSend: function (data, textStatus) {
                    $delObject.text("...");
                },
                success: function (data, textStatus) {
                    if (data == "1") {
                        $delObject.parent().parent("tr").remove();
                    } else {
                        alert("删除失败!");
                        $delObject.text("[删除]");
                    }
                },
                error: function (e) { alert("连接失败,请向Eoyoo官方技术人员反馈!"); }
            })
        }
        return false;
    });
});