62,254
社区成员
发帖
与我相关
我的任务
分享
<div id="Popup" style="DISPLAY: none; BACKGROUND-IMAGE: none; POSITION: absolute">
<table align="left">
<TR>
<TD bgColor="#ffffc0">
<DIV id="t1" ms_positioning="FlowLayout">Label</DIV>
</TD>
</TR>
</table>
</div>
function Show()
{
document.getElementById("t1").innerText="显示内容";
x = (window.event.clientX-3)+ document.body.scrollLeft;
y = (event.clientY+10) + document.body.scrollTop + 6;
Popup.style.display="block";
Popup.style.left = x;
Popup.style.top = y;
}
<html>
<head>
<title></title>
</head>
<body onmousemove=getmpoint()>
<div id="point"></div>
<script language="javascript" type="text/javascript">
function getmpoint(event)
{
if (!event) event = window.event; // for IE
var x;
var y;
x = event.clientX;
y = event.clientY;
document.getElementById("point").innerHTML=x+","+y;
}
</script>
</body>
</html>