日期:2014-05-16  浏览次数:20688 次

jquery:$.ajax() 简单 例子
function CoursewareOffShelf(o) {
            alert(o.id);
            $.ajax(
                {
                    type: "post",
                    url: "AjaxCoursewareOffShelf.aspx",
                    data: {
                        "ApplicationId": o.id,
                        "ApplicationTypeId":2
                    },
                    success: function (data, textStatus)
                    {
                        var j = eval(data);
                        $.each(j, function (i, item) {
                            var count = item.count;
                            if (count > 0) {
                                var _mkingCount = $('#<%=lbShelfed.ClientID %>').html();
                                var _mkingCurrentCount = (_mkingCount - 1);
                                $('#<%=lbShelfed.ClientID %>').html(_mkingCurrentCount);
                                divShelfed_click();

                            }
                            else {
                                alert("课件下架申请失败!");
                            }