问一个关于图片上面热区坐标位置的问题
<html>
<head>
<title>网络拓扑--地图</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<style type='text/css' id='defaultPopStyle'>
.cPopText { background-color:red;color:red; border: 2px red solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}
</style>
<script language=javascript>
//***************内部变量定义*****************
sPop=null;
MouseX=null;
MouseY=null;
function showPopupText(o){
var o=event.srcElement;
MouseX=event.x;
MouseY=event.y;
if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
if(o.dypop!=sPop) {
sPop=o.dypop;
if(sPop==null || sPop=="") {
dypopLayer.innerHTML="";
dypopLayer.style.filter="Alpha()";
dypopLayer.filters.Alpha.opacity=0;
}
else {
if(o.dyclass!=null) popStyle=o.dyclass
else popStyle="cPopText";
showIt();
}
}
}
function showIt(){
dypopLayer.className=popStyle;
//在这里设置..可以做出各种各样的效果.
dypopLayer.innerHTML="<font color=white><b>"+sPop+"</b></font>";
popWidth=dypopLayer.clientWidth;
popHeight=dypopLayer.clientHeight;
if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
else popLeftAdjust=0;
if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
else popTopAdjust=0;
dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
dypopLayer.style.filter="Alpha(Opacity=100)";
}
document.onmouseover=showPopupText;
</script>