关于ajax请求数据的方法

    
$.ajax({  //课程详情信息
    type:'get',
    data: {'id':courseId},
    dataType:'json',    
    beforeSend : function(){
       //正在加载...
     },                     
    url : '/ecourse/service/coursedetailservice/findCourseById?t='+new Date().getTime(),                       
    success  : function(data) {    
       
            
        }
    complete : function(){
      //加载完毕...
    }
    },  
    error : function( ) {
        window.location.href="error.jsp";
        
    }  
})
}

posted @ 2017-07-03 13:30  砍刀哥  阅读(210)  评论(0编辑  收藏  举报