开发者

Is this a bug in IE8 / jQuery?

I am targeting my form with a submit listener.

The HTML

<div id="entry-form">
   <form method="post" action="">
       <input type="submit" value="submit" />开发者_如何学C;
   </form>
</div>

The Script:

    $(document).ready(function(){

        $("#entry-form form").submit(function(e){
            e.preventDefault();
            alert("In Submit Form");
        });

    });

This works fine in all the browsers I have tested thus far. However when I try to use a section tag rather than a div:

<section id="entry-form">
   <form method="post" action="">
       <input type="submit" value="submit" />
   </form>
</section>

The submit listener will no longer work in IE8 and instead IE8 submits the form with a page refresh. This is not the case in FF where it will work as intended.

Is this a known bug with IE8 and jQuery?


Most html5 features, including "section", are not supported in IE browsers earlier than IE9.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜