<span id="contextobox" style="cursor:hand; margin-left:5px; margin-right:10px;
background:#e4e4e4; width:300; height:40; padding:20px;" onclick="alert
(this.offsetLeft+'\n'+this.offsetTop)">消费券管理</span>
background:#e4e4e4; width:300; height:40; padding:20px;" onclick="alert
(this.offsetLeft+'\n'+this.offsetTop)">消费券管理</span>
var lf=document.all.contextobox.offsetLeft;
var top=document.all.contextobox.offsetTop;
alert('x='+lf+' y='+top);
}
<!--
document.onclick=function()
{
alert(event.x+'\n'+event.y);
}
//-->
</script>