最简单的答案:jQuery。做这样的事情:
$(document).ready(function(){ var $form = $('form'); $form.submit(function(){ $.post($(this).attr('action'), $(this).serialize(), function(response){ // do something here on success },'json'); return false; });});如果要动态添加内容并且仍然需要它来工作,并且还需要使用多种形式,则可以执行以下操作:
$('form').live('submit', function(){ $.post($(this).attr('action'), $(this).serialize(), function(response){ // do something here on success },'json'); return false; });


