2014-09-25 62 views
-1

即将启动AJAX有人可以帮助,指导我该如何做,我应该从哪里学习。 (我在Lynda有会员资格,他们有一个关于AJAX的课程[只有2个小时]我不认为这足够了,对不对?)。需要提示AJAX

+0

u使用jQuery的___ – 2014-09-25 06:41:56

+0

是的,但我不知道的AJAX部分 – user3512121 2014-09-25 06:44:27

回答

0

的jQuery AJAX文档:http://api.jquery.com/jquery.ajax/

我推荐这种方法:

$.ajax({ 
    type: "POST", 
    url: 'ajax_controller.php', //url to u controller in PHP 
    data: { //Data transmitted to the controller 
     id: id, 
     action: 'delete' 
    } 
}).done(function(result){ 
    console.log(result);//show controller result in console 
});