|
|
|
|
/*
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD>ö<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>ʱ֮<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҪJQuery<EFBFBD><EFBFBD>֧<EFBFBD>֣<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>ʾDIV Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD> HF
|
|
|
|
|
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
objid, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>ʾ֮Ԫ<EFBFBD><EFBFBD>ID
|
|
|
|
|
desid <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ֮<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>ϢDIV ID
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
function Set_objMessage_OnMouse(objid, desid)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//<2F>ݴ<EFBFBD><DDB4><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
var objTimeID = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
|
|
|
|
|
$("#" + objid).mouseover(
|
|
|
|
|
function(eve)
|
|
|
|
|
{
|
|
|
|
|
var myevent = null;
|
|
|
|
|
var iTmp = 0;
|
|
|
|
|
|
|
|
|
|
myevent = eve == null ? window.event : eve;
|
|
|
|
|
|
|
|
|
|
//<2F><>λ<EFBFBD><CEBB>ʾ<EFBFBD>ֳ<F2B2BFB7><D6B3><EFBFBD>ҳ<EFBFBD>淶Χ
|
|
|
|
|
iTmp = (myevent.pageX + $("#"+desid).outerWidth()) - document.body.scrollWidth;
|
|
|
|
|
iTmp = iTmp > 0? myevent.pageX - $("#"+desid).outerWidth(): myevent.pageX;
|
|
|
|
|
|
|
|
|
|
$("#"+desid).css("top",myevent.pageY-170);
|
|
|
|
|
$("#"+desid).css("left",iTmp);
|
|
|
|
|
|
|
|
|
|
$("#" + desid).fadeIn("fast");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>ʱ
|
|
|
|
|
$("#" + objid).mouseout(
|
|
|
|
|
function()
|
|
|
|
|
{
|
|
|
|
|
objTimeID = setTimeout("$('#" + desid + "').fadeOut('slow')",500);
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ʾDIVʱ
|
|
|
|
|
$("#" + desid).mouseover(
|
|
|
|
|
function()
|
|
|
|
|
{
|
|
|
|
|
clearTimeout(objTimeID);
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>Ϣ<EFBFBD><CFA2>ʾDIVʱ
|
|
|
|
|
$("#" + desid).mouseout(
|
|
|
|
|
function()
|
|
|
|
|
{
|
|
|
|
|
objTimeID = setTimeout("$('#" + desid + "').fadeOut('slow')",500);
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function offset(el){
|
|
|
|
|
var bmt = Number(getObjStyle(document.body,"marginTop").replace("px",""));
|
|
|
|
|
var bml = Number(getObjStyle(document.body,"marginLeft").replace("px",""));
|
|
|
|
|
var bbtw = Number(getObjStyle(document.body,"borderTopWidth").replace("px",""));
|
|
|
|
|
var bblw = Number(getObjStyle(document.body,"borderLeftWidth").replace("px",""));
|
|
|
|
|
var pos = {top:el.offsetTop,left:el.offsetLeft};
|
|
|
|
|
var node = el;
|
|
|
|
|
var tw,lw;
|
|
|
|
|
var ua = navigator.userAgent.toLowerCase();
|
|
|
|
|
|
|
|
|
|
if(ua.indexOf('msie') != -1){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while(node.offsetParent){
|
|
|
|
|
if(isNaN(tw))
|
|
|
|
|
tw=0;
|
|
|
|
|
pos.top += node.offsetParent.offsetTop;
|
|
|
|
|
node = node.offsetParent;
|
|
|
|
|
}
|
|
|
|
|
if(isNaN(bml))
|
|
|
|
|
bml=0;
|
|
|
|
|
if(isNaN(bblw))
|
|
|
|
|
bblw=0;
|
|
|
|
|
if(isNaN(bbtw))
|
|
|
|
|
bbtw=0;
|
|
|
|
|
|
|
|
|
|
pos.top += bbtw;
|
|
|
|
|
pos.left = el.offsetLeft+bml+bblw;
|
|
|
|
|
}
|
|
|
|
|
else if(ua.indexOf('opera') != -1){
|
|
|
|
|
while(node.offsetParent){
|
|
|
|
|
pos.top += node.offsetParent.offsetTop;
|
|
|
|
|
pos.left += node.offsetParent.offsetLeft;
|
|
|
|
|
node = node.offsetParent;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if(ua.indexOf('chrome') != -1){
|
|
|
|
|
while(node.offsetParent){
|
|
|
|
|
tw = Number(getObjStyle(node.offsetParent,"borderTopWidth").replace("px",""));
|
|
|
|
|
lw = Number(getObjStyle(node.offsetParent,"borderLeftWidth").replace("px",""));
|
|
|
|
|
pos.top += node.offsetParent.offsetTop+tw;
|
|
|
|
|
pos.left += node.offsetParent.offsetLeft+lw;
|
|
|
|
|
node = node.offsetParent;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
while(node.offsetParent){
|
|
|
|
|
tw = Number(getObjStyle(node.offsetParent,"borderTopWidth").replace("px",""));
|
|
|
|
|
lw = Number(getObjStyle(node.offsetParent,"borderLeftWidth").replace("px",""));
|
|
|
|
|
pos.top += node.offsetParent.offsetTop+tw;
|
|
|
|
|
pos.left += node.offsetParent.offsetLeft+lw;
|
|
|
|
|
node = node.offsetParent;
|
|
|
|
|
}
|
|
|
|
|
pos.top += bbtw;
|
|
|
|
|
pos.left += bblw;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return pos;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getObjStyle(obj,styleName){
|
|
|
|
|
return document.defaultView!=null?document.defaultView.getComputedStyle(obj,null)[styleName]:obj.currentStyle[styleName];
|
|
|
|
|
}
|