jQuery form submit() is not working in IE6?

后端 未结 8 1741
忘掉有多难
忘掉有多难 2020-12-03 01:14

I want to submit a with using jquery as below;

$(\"#formid\").submit();

Its working perfect in all browsers except IE6.

How to mak

相关标签:
8条回答
  • 2020-12-03 01:56

    I had a similar problem when I was about to submit the form via an A-element. I had set the href attribute to "javascript:;" to let the main jQuery script handle the actual submit but it just wouldn't work in IE6.

    jQuery main script:

    $(".submitLink").click(function(){
    $(this).parent()[0].submit();
    $(this).addClass("loading");
    });
    

    My solution was to change the href attribute from "javascript:;" to "#".

    0 讨论(0)
  • 2020-12-03 01:57

    Just add a

    window.setTimeout(function(){
        $("#formid").submit();
    }, 300);
    
    0 讨论(0)
提交回复
热议问题