2011-09-26 65 views

回答

1

從這個AJAX插件:malsup form,你可以嘗試兩種Ajax表單,然後決定哪一個更適合你和iframe的形式相同,這裏有一個例子:

$("#your-form-id").ajaxForm({ 
//iframe: true //this goes with iframe 
success: function (responseText, statusText, req, $form) 
       { $("#target-div-id").html(responseText); } }); 

阿賈克斯使用,除非你有文件上傳,然後你可以使用iframe,模仿ajax形式。