什么是的Ajax.Updater的jQuery中的相同呢? [英] What is the equivalent of Ajax.updater in Jquery?
本文介绍了什么是的Ajax.Updater的jQuery中的相同呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请让我知道下面的原型code jQuery中的等价物。
Please let me know the equivalent of below prototype code in Jquery.
var myAjax = new Ajax.Updater('abc', '/billing/add_bill_detail', {
method: 'get',
parameters: pars,
insertion: Insertion.Bottom
});
我想用jQuery来执行相同的操作。
I want to perform the same action using Jquery.
在此先感谢。
推荐答案
在jQuery的阿贾克斯将如下使用:
In jQuery the Ajax will use as following:
$.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是div的ID,或使用.abc的,如果ABC是一个类。
Use #abc if abc is the id of the div or use .abc if abc is a class.
您可以将returnData IIN你的HTML,你想要的,
You can place the returnData iin your HTML where you want,
这篇关于什么是的Ajax.Updater的jQuery中的相同呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文