Reputation: 74550
How do I load another page on the onClick event in Javascript?
<div id="div_man" onclick="/subfolder/index.htm"></div>
The code above is not working. Please explain. I am sure it's quite simple. Thanks in advance!
Upvotes: 11
Views: 43432
Reputation: 3999
<div id="div_man" onclick="location.href='/subfolder/index.htm'"></div>
Here's a working example: http://jsfiddle.net/ArtBIT/EEjyP/
Upvotes: 20