Enjoy Life

A Ryan Gene Blog!

Wednesday, September 06, 2006

[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>

posted by Ryan Gene at 9:17 PM

0 Comments:

Post a Comment

<< Home

Name:
Location: Shanghai, Shanghai, China

Powered by Blogger
Powered by Writely

Add to Google

Site Feed