ajaxSubmit和Internet Explorer问题 [英] ajaxSubmit and Internet explorer issue

查看:192
本文介绍了ajaxSubmit和Internet Explorer问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经坚持了一段时间,有人可以帮助我吗?使用Chrome和FF一切正常,但由于某种原因,表格不会提交IE7 / IE8 / IE9。

I'm stuck for quite some time with this, could someone help me out ? Everything is working fine with Chrome and FF, but for some reason the form won't submit with IE7/IE8/IE9.

function addFile()
{
if ( test > 30 ) { console.log( "addFile" ) ; }

var optionsAjaxFormFile = { 
    url : 'js/fileUpload.php',
    success : showResponseFile
}; 

console.log("about to submit Ajax");
$("#addFile-form").ajaxSubmit( optionsAjaxFormFile );   
}

我从控制台知道它转到ajaxSubmit线,但它永远不会启动showResponseFile函数。为什么???

I know from the Console it goes to the ajaxSubmit line, but it never starts the showResponseFile function. Why ???

干杯

推荐答案

不确定但是你可以试试这个:

Not sure but you can try with this:

$(document).ready(function() { 
   $("#addFile-form").submit(function(){
      $(this).ajaxSubmit(optionsAjaxFormFile);
      return false; 
   });
});

这篇关于ajaxSubmit和Internet Explorer问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆