2014-09-25 67 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 
});