$(‘.del‘).on(‘click‘, function () { var id = $(this).attr(‘id‘); var url = ‘/m/g2_content_del/‘ + id; var that = this; $.post(url, function (a, b, c, d) { var getItem = function () { return function () { return that; }; } var current = getItem()(); var data = a; if (data.status == 200) { $(current).parent().parent().remove(); } }); });
jquery pass parameter to ajax callback
时间: 2024-11-11 14:13:27