📄 menu.js
字号:
}
function MenuItemMouseOver(obj)
{
obj.style.backgroundColor = "#E6E6E6";
}
function MenuItemMouseOut(obj)
{
obj.style.backgroundColor = "transparent";
}
function ColorTxtOvr(e)
{
e.style.border="1px #000080 solid";
e.style.backgroundColor="#FFEEC2";
}
function ColorTxtOut(e)
{
e.style.border="1px white solid";
e.style.backgroundColor="white";
}
function ColorChangeView(e,viewPanelId)
{
var node;
if (document.all)
{
node = event.srcElement;
}
else
{
node = e.target;
}
if (node.tagName == "IMG")
{
document.getElementById(viewPanelId).style.backgroundColor = node.style.backgroundColor;
}
}
function SelectColor(e,viewPanelId)
{
var color = null;
var node;
if (document.all)
{
node = event.srcElement;
}
else
{
node = e.target;
}
if (node.tagName == "IMG")
{
color = node.style.backgroundColor;
document.getElementById(viewPanelId).style.backgroundColor = color;
format(ColorOption, color);
}
}
function CreateMoreColorPanel()
{
var a=[];
a.push('<div style="width:203px; border:1px #4e6e89 solid; background-color:#FFFFFF">');
a.push('<div style="position:relative;margin:1px 1px 1px 1px;height:19px">');
a.push('<img id="colorClearMore" src="images/full_colr_remove.gif" style="width:199px;height:17px;background-color:white;border:1px solid white;cursor:pointer;" onmouseover="ColorTxtOvr(this);" onmouseout="ColorTxtOut(this);" onclick="ClearColor();"/>');
a.push('<div id="colorPreViewMore" style="position:absolute;top:3px;left:3px;border:1px solid #ACA899;font-size:1px;width:28px;height:11px;"></div>');
a.push('</div>');
a.push('<div style="margin-left:2px!important;margin-left:1px;margin-top:2px!important;margin-top:1px; margin-bottom:1px;">');
a.push('<table id="fullColorSelectMore" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;cursor:pointer; border:1px solid #000000" bordercolor="#000000" onclick="SelectColor(this,\'colorPreViewMore\');" onmouseover="ColorChangeView(this,\'colorPreViewMore\');" >');
for(i=0;i<2;i++)
{
for(j=0;j<6;j++)
{
a.push('<tr height=10>');
if(i==0)
{
a.push('<td style="font-size:0px;"><img src="images/place.gif" width=10 style="background-color:#'+ColorHex[j]+ColorHex[j]+ColorHex[j]+'" /></td>');
}
else
{
a.push('<td style="font-size:0px;"><img src="images/place.gif" width=10 style="font-size:1px;background-color:#'+SpColorHex[j]+'" /></td>');
}
a.push('<td style="font-size:0px;"><img src="images/place.gif" width=10 style="font-size:1px;background-color:#000000" /></td>');
for(k=0;k<3;k++)
{
for(l=0;l<6;l++)
{
a.push('<td style="font-size:0px;"><img src="images/place.gif" width=10 style="font-size:1px;background-color:#'+ColorHex[k+i*3]+ColorHex[l]+ColorHex[j]+'" /></td>');
}
}
a.push('</tr>');
}
}
a.push('</table>');
a.push('</div>');
a.push('</div>');
return a.join("");
}
function CreateSimpleColorPanel()
{
var splaceImg = "images/splace.gif";
var a=[];a.push('<div style="border: 1px #9FAC87 solid; width:158px;background-color:white;">');a.push('<div style="position:relative;margin-left:2px; margin-top:3px; margin-bottom:0px;height:19px">');a.push('<img id="colorClearSingle" src="images/simple_colr_remove.gif" style="width:150px;height:17px;background-color:white;border:1px solid #FFFFFF;cursor:pointer;" onmouseover="ColorTxtOvr(this);" onmouseout="ColorTxtOut(this);" onclick="ClearColor();" />');a.push('<div id="colorPreViewSingle" style="position:absolute;top:3px;left:4px;border:1px solid #ACA899;font-size:1px;width:28px;height:11px;"> </div>');a.push('</div>');a.push('<div>');a.push('<table id="colorSelectSinglePanel" cellspacing="6" cellpadding="0" style="border-collapse:separate;" onclick="SelectColor(this,\'colorPreViewSingle\');" onmouseover="ColorChangeView(this,\'colorPreViewSingle\');">');a.push('<tr>');a.push('<td><img src="' + splaceImg + '" style="background-color:#000000; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="黑色"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#993300; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="褐色"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#333300; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="橄榄色"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#003300; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="深绿"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#003366; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="深青"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#000080; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="深蓝"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#333399; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="靛蓝"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#333333; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="灰色-80%"></img></td>');a.push('</tr><tr>');a.push('<td><img src="' + splaceImg+'" style="background-color:#800000; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="深红"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#FF6600; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="橙色"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#808000; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="深黄"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#008000; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="绿色"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#008080; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="青色"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#0000FF; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="蓝色"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#666699; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="蓝-灰"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#808080; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="灰色-50%"></img></td>');a.push('</tr><tr>');a.push('<td><img src="' + splaceImg + '" style="background-color:#FF0000; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="红色"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#FF9900; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="浅橙色"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#99CC00; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="酸橙色"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#339966; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="海绿"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#33CCCC; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="水绿色"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#3366FF; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="浅蓝"></img></td>');a.push('<td><img src="' + splaceImg + '" style="background-color:#800080; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="紫罗兰"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#999999; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="灰色-40%"></img></td>');a.push('</tr><tr>');a.push('<td><img src="'+splaceImg+'" style="background-color:#FF00FF; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="粉红"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#FFCC00; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="金色"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#FFFF00; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="黄色"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#00FF00; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="鲜绿"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#00FFFF; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="青绿"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#00CCFF; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="天蓝"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#993366; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="梅红"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#C0C0C0; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="灰色-25%"></img></td>');a.push('</tr><tr>');a.push('<td><img src="'+splaceImg+'" style="background-color:#FF99CC; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="玫瑰红"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#FFCC99; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="茶色"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#FFFF99; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="浅黄"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#CCFFCC; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="浅绿"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#CCFFFF; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="浅青绿"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#99CCFF; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="淡蓝"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#CC99FF; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="淡紫"></img></td>');a.push('<td><img src="'+splaceImg+'" style="background-color:#FFFFFF; border:1px solid #ACA899;font-size:1px;width:11px;height:11px; cursor:pointer" title="白色"></img></td>');a.push('</tr>');a.push('</table>');a.push('</div>');a.push('<img id="MoreColor" src="images/more_colr.gif" style="border:1px solid white; margin-left:3px; margin-top:0px; margin-bottom:3px; height:16px; width:150px; cursor:pointer;" onmouseover="ColorTxtOvr(this);" onmouseout="ColorTxtOut(this);" onclick="ShowMenu(\'MoreColor\');"/>');a.push('</div>');
return a.join("");
}
function ClearColor()
{
var color = "#FFFFFF";
if (ColorOption == "foreColor")
{
color = "#000000";
}
else if (ColorOption == "backColor")
{
color = "#FFFFFF";
}
format(ColorOption, color);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -