【发布时间】:2012-04-10 15:53:07
【问题描述】:
插件: http://www.malsup.com/jquery/form/#ajaxSubmit
代码:
$( 'form#form' ).live('submit', function( event ){
if( this.arquivo )
{
var options = {
success: showResponse
};
// pass options to ajaxForm
$( '#form' ).ajaxForm( options );
$( '#form' ).ajaxSubmit();
return false;
}
});
function showResponse(responseText, statusText, xhr, $form) {
alert( responseText );
}
通过提交表单,函数 showResponse 没有被调用。
【问题讨论】: