esempio
codice:
<html>
<head>
<title></title>
<style type="text/css">
<!--
#primo {
background-color:#0f0;
}
#secondo {
background-color:#00f;
}
#terzo {
background-color:#f00;
}
-->
</style>
</head>
<body>
<div id="primo">ciao, sono un div
<span id="secondo">ciao, sono uno span ciao, sono un link</span>
</div>
<hr />
<div id="registro"></div>
<script language="JavaScript" type="text/javascript">
<!--
document.onmousemove=getMouseMove
function getMouseMove(e){
if(!e) e=window.event;
var source=(e.target)?e.target:e.srcElement;
document.getElementById('registro').innerHTML='TAG: '+source.tagName.toLowerCase()+' | ID: '+((source.id)?source.id:'assente')
}
//-->
</script>
</body>
</html>
ho messo lo script nel body x essere sicuro che esista il "registro" su cui annotare le informazioni
ciao