Hi all, this my problem is: how can i get the X,Y coordinate of the layer which has position relative to other object.
for example :
----------------
<Html>
<BODY>
<script>
function MOut(t)
{
if(t!="")
it=document.getElementById(t);
alert(it.event.clientX);//this line is my idea, i know it's not run, but i put here
}
</script>
<Div id="l1" style="position:absolute;width :30px;height:150px;top:0px;left:0px;z-index:1;background-color:blue" ></DIV>
<Div id="l2" style ="position:relative;width :20px;height:30px;top:- 50px;left:5px;z-index:3;background-color:red" onmouseout ="MOut('l2')"></DIV>
</BODY>
</html>
---------------
The function MOut is not run, but i put in the code to explain my idea.
if I use function : window.event.clientX; but this Func only return the X,Y coordinate relative to window...
Help me to solve this problem, Thanks to all!
for example :
----------------
<Html>
<BODY>
<script>
function MOut(t)
{
if(t!="")
it=document.getElementById(t);
alert(it.event.clientX);//this line is my idea, i know it's not run, but i put here
}
</script>
<Div id="l1" style="position:absolute;width :30px;height:150px;top:0px;left:0px;z-index:1;background-color:blue" ></DIV>
<Div id="l2" style ="position:relative;width :20px;height:30px;top:- 50px;left:5px;z-index:3;background-color:red" onmouseout ="MOut('l2')"></DIV>
</BODY>
</html>
---------------
The function MOut is not run, but i put in the code to explain my idea.
if I use function : window.event.clientX; but this Func only return the X,Y coordinate relative to window...
Help me to solve this problem, Thanks to all!
Comment