码迷,mamicode.com
首页 > Web开发 > 详细

jquery pass parameter to ajax callback

时间:2014-07-30 11:30:03      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   os   io   cti   ar   div   

 

 

 

            $(‘.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,布布扣,bubuko.com

jquery pass parameter to ajax callback

标签:style   blog   color   os   io   cti   ar   div   

原文地址:http://www.cnblogs.com/zyip/p/3877246.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!