请让我知道在Jquery中的以下原型代码的等价物。jquery中Ajax.updater的等价物是什么?
var myAjax = new Ajax.Updater('abc', '/billing/add_bill_detail', {
method: 'get',
parameters: pars,
insertion: Insertion.Bottom
});
我想使用Jquery执行相同的操作。
在此先感谢。如果ABC是div的id
$.ajax({
url: "/billing/add_bill_detail",
type: "get",
dataType: "html",
data: {"pars" : "abc"},
success: function(returnData){
$("#abc").html(returnData);
},
error: function(e){
alert(e);
}
});
使用#abc或使用名为.abc ABC是一个类:
这应该指向正确的方向。 http://stackoverflow.com/questions/572161/converting-from-prototype-to-jquery – Flobbo 2013-03-22 07:44:52
宣读此链接:http:// api。jquery.com/jQuery.ajax/ – Jai 2013-03-22 07:45:12
$ .get,$ .ajax,$。post – 2013-03-22 07:46:28