什么是的Ajax.Updater的jQuery中的相同呢?是的、Ajax、jQuery、Updater

由网友(一个抽风的男人)分享简介:请让我知道下面的原型code jQuery中的等价物。Please let me know the equivalent of below prototype code in Jquery.var myAjax = new Ajax.Updater('abc', '/billing/add_bill_detail'...

请让我知道下面的原型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,

阅读全文

相关推荐

最新文章