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.
精彩评论