Hey, I know of two ways to place a link on an HTML page; (1) use the
anchor element, and (2) use javascript to respond to an event (such as
onclick) and set the location.
I recently started using anchors more, and I eventually happened to
try to put an anchor link around an input button, as you can see:
<a href="example.c om"><input type="button" value="Example" /></a>
This worked fine in Firefox and Chrome, but it doesn't have any effect
in IE (you can push the button, but nothing happens). Why is this, how
can I fix it, and should I just stick with the javascript method as
shown below:
<input type="button" value="Example" onclick="locati on.href =
'example.com';" />
Thanks.
anchor element, and (2) use javascript to respond to an event (such as
onclick) and set the location.
I recently started using anchors more, and I eventually happened to
try to put an anchor link around an input button, as you can see:
<a href="example.c om"><input type="button" value="Example" /></a>
This worked fine in Firefox and Chrome, but it doesn't have any effect
in IE (you can push the button, but nothing happens). Why is this, how
can I fix it, and should I just stick with the javascript method as
shown below:
<input type="button" value="Example" onclick="locati on.href =
'example.com';" />
Thanks.
Comment