Javascript 这个原型Ajax.Updater调用的等效jQuery实现是什么?

Javascript 这个原型Ajax.Updater调用的等效jQuery实现是什么?,javascript,jquery,prototypejs,Javascript,Jquery,Prototypejs,如何在jQuery中创建相同的实现 <a href="#" onclick="new Ajax.Updater('input_123', '/record/123', {asynchronous:true, evalScripts:true}); return false;"> 将jQuery绑定到“a”标记 $(document).ready(){ $('a#ajax').click(function(event){ event.preventDefault()

如何在jQuery中创建相同的实现

<a href="#" onclick="new Ajax.Updater('input_123', 
'/record/123', 
{asynchronous:true, evalScripts:true}); return false;">

将jQuery绑定到“a”标记

$(document).ready(){
  $('a#ajax').click(function(event){
    event.preventDefault();
    $.ajax('/process.php', data);
  });

}
我从未使用过原型,但这是我最好的猜测。也许最好给你的锚定一个id,并用它来附加行为

这是假设input_123是某物的id,从/record/123返回的get是其中的html

$(function(){
    $('a').click(function(e){
        $('#input_123').load('/record/123');
        e.preventDefault();
    });
});