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
|
<html>
<head>
<style>
* {position : relative}
.Calendrier {position:absolute;}
</style>
<script>
if (navigator.appName.substring(0,3) == "Net") document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = position;
function position(e) {
x = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft;
y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop;
}
function affich_calendar()
{
alert(x);
alert(y);
document.getElementById('Calendrier').style.top=y+"px";
document.getElementById('Calendrier').style.left=x+"px";
document.getElementById('Calendrier').innerHTML = "yep"
}
</script>
</head>
<body>
<div id="Calendrier" onmouseout="calendarTimeout();" class="Calendrier" onmouseover="if (timeoutId) clearTimeout(timeoutId);"></div>
<br /><br /><br /><br />
-------------------<span style="cursor:pointer" onclick='affich_calendar()' >bouton</span>
</body>
</html> |
Partager