开发者

Javascript onclick div element load page similar to link

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 advan开发者_StackOverflow社区ce!


<div id="div_man" onclick="location.href='/subfolder/index.htm'"></div>

Here's a working example: http://jsfiddle.net/ArtBIT/EEjyP/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜