<html><head><title>Test</title>
<script type="text/javascript">
function Mausklick (Ereignis) {
if (!Ereignis)
Ereignis = window.event;
alert(Ereignis.clientY);
}
function init (a){
document.getElementById(a).onclick = Mausklick;
}
</script>
</head><body>
<div id="box1" onmousedown="init(this.id)" style="background-color:#005080; position:absolute; top:100px; left:100px; width:100px; height:100px;"></div>
<div id="box2" onmousedown="init(this.id)" style="background-color:#805000; position:absolute; top:300px; left:300px; width:100px; height:100px;"></div>
</body></html> |