?? popmenu1.js
字號:
var x, y;
document.onmousedown=new Function(" click(event); return false;")
document.onkeypress=new Function(" press(event); return true;")
MSIEIndex = navigator.userAgent.indexOf("MSIE");
netscap = ((MSIEIndex) == -1);
function press(e)
{
if (PopMenu.style.visibility!="hidden")
{
//alert(event.keyCode);
if (netscap)
{
doClick(e.which);
}
else
{
//if (e.keyCode == 69){alert("E");}
doClick(e.keyCode,inPop);
}
}
}
function doClick(iCode)
{
var Char;
if (iCode>0)
{
Char=String.fromCharCode(iCode);
Char=Char.toUpperCase();
}else
{
Char=iCode
};
//alert(Char);
obj=inPop.document.all["td"+Char];
if (!obj)
{
}
else
{
if (obj.disabled)
{
}
else
{
switch (Char)
{
case 'B':
history.back();
break;
case 'O':
history.forward();
break;
case 'X':
location.href="/indexFrame-main.htm";
break;
case 'Q':
top.close();
break;
case 'E':
alert("E");
break;
case 'D':
alert("D");
break;
case 'S':
window.location='view-source:'+window.location.href;
break;
case 'R':
//alert("aaa");
location.reload();
break;
}
PopMenu.style.visibility='hidden';
}
}
}
function click(e,type)
{
if (!e) var e = event
if (e.button==2)
{
winx = document.body.clientWidth;
winy = document.body.clientHeight;
x = e.clientX;
y = e.clientY;
if (type==1)
{
if (MenuStatus==1)
{
x=x+187;
}else
{
x=x+18;
}
}
if ((x+menuWidth)>winx)
{
x=x-menuWidth;
}
if ((y+menuHeight)>winy)
{
y=y-menuHeight;
}
PopMenu.style.visibility='hidden';
window.setTimeout("showMenu();", 500);
}
else
{
PopMenu.style.visibility='hidden';
}
}
function showMenu()
{
//--------- judge disable -----------
/*if (window.history.length>0)
{
document.all["tdB"].disabled=false;
}*/
//-----------------------------------
PopMenu.style.left = x+3;
PopMenu.style.top = y+4;
PopMenu.style.visibility="";
}
function MouseEvents() {
document.onmousedown = new Function(" click(event); return false;")
document.oncontextmenu = new Function("return false;");
}
MouseEvents()
function SetOverColor(obj)
{
obj.style.backgroundColor="#08246b";
obj.style.color="FFFFFF";
}
function SetOutColor(obj)
{
obj.style.backgroundColor="d6d3ce";
obj.style.color="#000000";
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -