?? pop_win.js
字號:
// Description : 彈出式提示窗口
//***********默認設置定義.*********************
tPopWait = 0; //停留tWait毫秒后顯示提示。
tPopShow = 5000; //顯示tShow毫秒后關閉提示
showPopStep = 20;
popOpacity = 95;
//***************內部變量定義*****************
sPop = null;
curShow = null;
tFadeOut = null;
tFadeIn = null;
tFadeWaiting = null;
document.write("<div id='divPopWin' style='position:absolute;z-index:1000;' ></div>");
function ShowPopWin()
{
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;
clearTimeout(curShow);
clearTimeout(tFadeOut);
clearTimeout(tFadeIn);
clearTimeout(tFadeWaiting);
if (sPop == null || sPop == "")
{
divPopWin.innerHTML = "";
divPopWin.style.filter = "Alpha()";
divPopWin.filters.Alpha.opacity = 0;
}
else
{
if (o.dyclass!=null)
popStyle = o.dyclass
else
popStyle = "list_table";
curShow = setTimeout("ShowIt()",tPopWait);
}
}
}
function ShowIt()
{
divPopWin.className = popStyle;
divPopWin.innerHTML = sPop;
popWidth = divPopWin.clientWidth;
popHeight = divPopWin.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;
divPopWin.style.left = MouseX+12+document.body.scrollLeft+popLeftAdjust;
divPopWin.style.top = MouseY+12+document.body.scrollTop+popTopAdjust;
divPopWin.style.filter = "Alpha(Opacity=0)";
FadeOut();
}
function FadeOut()
{
if (divPopWin.filters.Alpha.opacity < popOpacity)
{
divPopWin.filters.Alpha.opacity+=showPopStep;
tFadeOut = setTimeout("FadeOut()",1);
}
else {
divPopWin.filters.Alpha.opacity = popOpacity;
tFadeWaiting = setTimeout("FadeIn()",tPopShow);
}
}
function FadeIn()
{
if (divPopWin.filters.Alpha.opacity > 0)
{
divPopWin.filters.Alpha.opacity-=1;
tFadeIn = setTimeout("FadeIn()",1);
}
}
document.onmouseover = ShowPopWin;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -