时间:2010-07-23 17:19:59

标签: jquery ajax

2 个答案:

答案 0 :(得分:0)

你真的需要使用表单插件吗?您可以使用

获得相同的效果
$('#mt_survey').submit(function() {
   var $this = $(this);
   if ( ($this.valid() == true) || confirm("Unfinished form, continue saving as temporary?")) {
     $.ajax({
        data: $this.serialize + "&table=mt_data",
        success: function(response) { 
          $('#messages').html(response).fadeIn('slow'); //you may also need to do some processing of the response data before injecting as html
          $( 'html, body' ).animate( { scrollTop: 0 }, 0  );}
         });
       }
   return false;
  });

然后调试会更容易

答案 1 :(得分:0)

IE和Opera正在缓存数据并使用缓存数据,这就是您下次无法呼叫的原因

将代码更改为:

$('#mt_survey').ajaxSubmit({
     cache : false,
     data: {table: "mt_data"},

我已经遇到过这个问题,希望它能帮助你

相关问题