[导入][Code]ie和firefox在img嵌套在div中onclick事件的不同

ie和firefox在img嵌套在div中onclick事件的不同

为什么一定要这样?


<div id="ryan" style="position:absolute; top:0px; left:0px; border: 0px solid black; width:680px; height:639px">
<img id="imgFloor" ></img>
<script language=javascript>
if (document.getElementById && !document.all)
$('ryan').onclick =GetImageClick;
else
$('imgFloor').onclick =GetImageClick;
</script>
</div>

文章来源:http://jinweijie.blogspot.com/2006/09/codeiefirefoximgdivonclick.html
posted on 2006-09-06 21:17  JIN Weijie  阅读(1038)  评论(0编辑  收藏  举报