Button tag inside anchor not working in IE

HTML button tag might not work as expected when put inside anchor tags.

<a href="http://www.expertsguide.info/"><button type="button">Click Me to go to Experts Guide</button></a>

I works well in Mozilla Firefox but in Internet Explorer (IE) nothing happens on clicking it.


Put some javascript event inside onclick event handler. Redirect (or open a new window) in javascript to required URL.

 <a href="http://www.expertsguide.info/"><button type="button" onclick="window.open('http://www.expertsguide.info/')">Click Me to go to Experts Guide</button></a>

or to open the URL in the same window,

 <a href="http://www.expertsguide.info/"><button type="button" onclick="window.location('http://www.expertsguide.info/')">Click Me to go to Experts Guide</button></a>

It should work in Mozilla Firefox as well as Internet Explorer (IE).

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>