What the hell is wrong with IE? So I have some basic code like this:
<button><a href="index.php?showpage1">Show page1</a></button>
if (isset($_GET['showpage1'])) {
echo "some stuff";
}
This works in every browser except Internet Explorer 11 (did not test older browsers). I have taken out the link from within the button tags and it worked. I also have tried encapsulating the button within the link tags and guess what it: does not work.
When this happens my URL in IE also looks weird with a name attribute from a different HTML element!
Any thoughts on this problem?
Content model: Phrasing content, but there must be no interactive content descendant.
Interactive content is content that is specifically intended for user interaction.
a audio (if the controls attribute is present) button embed iframe img (if the usemap attribute is present) input (if the type attribute is not in the Hidden state) keygen label object (if the usemap attribute is present) select textarea video (if the controls attribute is present)
So as PeeHaa already pointed out in the comments: a
inside button
is explicitly not allowed by the spec.