function DialogShow(showdata,ow,oh,w,h,top) { //加一个top的参数
var objDialog = document.getElementById("DialogMove");
if (!objDialog) objDialog = document.createElement("div");
t_DiglogW = ow;
t_DiglogH = oh;
DialogLoc();
objDialog.id = "DialogMove";
var oS = objDialog.style;
oS.display = "block";
//oS.top = t_DiglogY + "px";
oS.top = top + "px"; //为当前DIV的TOP赋值
......//以下略
}function Report(Type,ID)
{
var PostData = "do=" + Type + "&reportid=" + ID;
var showData = sample.innerHTML;
ScreenConvert();DialogShow(showData,360,500,372,320,Mouse.y); //此处传入当前鼠标的Y坐标
} //新定义鼠标X,Y坐标函数
var Mouse = new function(){
this.x = 0;
this.y = 0;
this.capture = function(evt){
if (document.all) {// IE
Mouse.x = window.event.x + document.body.scrollLeft;
Mouse.y = window.event.y + document.body.scrollTop;
} else if (document.layers||document.getElementById) { // Netscape
Mouse.x = evt.pageX;
Mouse.y = evt.pageY;
}
//alert(Mouse.x + "/" + Mouse.y); //test
};
if (document.layers) { //netscape
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = this.capture;
}
var objDialog = document.getElementById("DialogMove");
if (!objDialog) objDialog = document.createElement("div");
t_DiglogW = ow;
t_DiglogH = oh;
DialogLoc();
objDialog.id = "DialogMove";
var oS = objDialog.style;
oS.display = "block";
//oS.top = t_DiglogY + "px";
oS.top = top + "px"; //为当前DIV的TOP赋值
......//以下略
}function Report(Type,ID)
{
var PostData = "do=" + Type + "&reportid=" + ID;
var showData = sample.innerHTML;
ScreenConvert();DialogShow(showData,360,500,372,320,Mouse.y); //此处传入当前鼠标的Y坐标
} //新定义鼠标X,Y坐标函数
var Mouse = new function(){
this.x = 0;
this.y = 0;
this.capture = function(evt){
if (document.all) {// IE
Mouse.x = window.event.x + document.body.scrollLeft;
Mouse.y = window.event.y + document.body.scrollTop;
} else if (document.layers||document.getElementById) { // Netscape
Mouse.x = evt.pageX;
Mouse.y = evt.pageY;
}
//alert(Mouse.x + "/" + Mouse.y); //test
};
if (document.layers) { //netscape
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = this.capture;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货