1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">.Style8 {font-size: 10px; font-family: Arial, Helvetica, sans-serif; }</style>
<script>
function souriceau(s)
{
if(navigator.appName.substring(0,3)=="Net")
{
setX = s.clientX+document.body.scrollLeft;
setY = s.clientY+document.body.scrollTop;
}
if(navigator.appName.substring(0,3)!="Net")
{
setX=event.x+document.body.scrollLeft;
setY=event.y+document.body.scrollTop;
}
}
document.onmousemove=souriceau;
var ixe
function sourisxy(monid)
{
ixe=" x"+setX +" y="+setY+" id="+monid;
alert(ixe)
window.location.href="recup.php?x="+setX +"&y="+setY +"&id="+monid;
}
</script>
</head>
<body>
<div id="id1" onclick="sourisxy(this.id);" style="z-index: 1; margin-left: 0px; margin-top: 0px; opacity: 1; width: 160px; height: 125px; border: 1px dashed #900; background-color: red;position:relative;">
<div id="id2" onclick="sourisxy(this.id);" style="z-index: 2; margin-left: 0px; margin-top: 0px; opacity: 1; width: 160px; height: 50px; border: 1px dashed #900; background-color: yellow;position:absolute; top:50px;"></div>
<div id="id3" onclick="sourisxy(this.id);" style="z-index: 3; margin-left: 0px; margin-top: 0px; opacity: 1; width: 160px; height: 25px; border: 1px dashed #900; background-color: green;position:absolute; top:25px;"></div>
</div>
</body>
</html> |
Partager