⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 head.js

📁 作为电子商务产品的其中模块之一《销售管理系统》的依据
💻 JS
字号:
var expandState = 0;
function expand(){
  if(expandState == 0){setPace('master', 0, 10, 10); if(ie){document.menutop.src = 'img/menui.gif'}; expandState = 1;}
  else{setPace('master', -200, 10, 10); if(ie){document.menutop.src='img/menuo.gif'}; expandState = 0;}
}
document.write("<style type=text/css>#master {LEFT: -200px; POSITION: absolute; TOP: 25px; VISIBILITY: visible; Z-INDEX: 999}</style>")
document.write("<table id=master height='100%'  width='218' border='0' cellspacing='0' cellpadding='0'><tr><td><img border=0 height=6 src=img/menutop.gif  width=200></td><td rowspan='2' valign='top'><img id=menu onMouseOver=javascript:expand() border=0 height=70 name=menutop src=img/menuo.gif width=18></td></tr>");
document.write("<tr><td valign='top'><table width='100%' height='100%' border='0' cellspacing='5' cellpadding='0'><tr><td height='400' valign='top'><table width=100% height='100%' border=1 cellpadding=0 cellspacing=5 bordercolor='#f1f0f5' bgcolor=#f1f0f5 style=FILTER: alpha(opacity=90)>");
document.write("<tr><td valign='top' bordercolor='#f1f0f5'>");
document.write("<iframe width='100%' height='100%' src='TaskMenu.html' frameborder=0></iframe></td></tr></table></td></tr></table></td></tr></table>");
var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0
var master = new Object('element')
master.curLeft = -200;   master.curTop = 10;
master.gapLeft = 0;      master.gapTop = 0;
master.timer = null;
if(ie){var sidemenu = document.all.master;}
if(ns){var sidemenu = document.master;}
setInterval('FixY()',100);

function MM_findObj(n,d)
			{
				var p,i,x;
				if(!d)d=document;
				if((p=n.indexOf("?"))>0&&parent.frames.length)
				{
					d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
				}
				if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];
				for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);
				if(!x && document.getElementById)x=document.getElementById(n);return(x);
			}

			function MSHL()
			{
				var i,p,v,obj,args=MSHL.arguments;
				for(i=0;i<(args.length-2);i+=3)if((obj=MM_findObj(args[i]))!=null){v=args[i+2];
				if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v='hide')?'hidden':v;}
			    obj.visibility=v;}
			}
				function MN1(n)
                 {
                       document.write("<div id=Layer" + n + " style='position:absolute'>");
                       document.write("<div id=serve" + n + " style='position:absolute; left:0px; top:14px; width:180px; height:30px; z-index:20; visibility: hidden;' onMouseOut=MSHL('serve" + n + "','','hide') onMouseOver=MSHL('serve" + n + "','','show')>");
                       document.write("<table width=100% border=0 cellspacing=1 cellpadding=3 bgcolor=#cccccc class=TBMenu style='FILTER: alpha(opacity=85)'>");

                       document.write("<tr bgcolor=eeeeee class=MenuBG>");
                       document.write("<td style='line-height:16px'>");
                       document.write("<table width=100% border=0 border=0 cellspacing=0 cellpadding=1 style=cursor:hand>");
                 }

				function MN(m,n)
                 {
                       document.write("<tr><td onmouseover=\"this.className='MenuColor';\" onmouseout=\"this.className='';\" colspan=2>");
                        document.write("<img src=images/blank.gif height=2 width=2><br><img src=images/blank.gif height=2 width=2><IMG SRC=Image/fl.gif WIDTH=9 HEIGHT=9 align=absmiddle BORDER=0><a href=\"");
                       if(m.substr(0,5) != "http:"){document.write("" + m + "\">" + n + "</a></td></tr>");}
                       else{document.write(m + "\">" + n + "</a></td></tr>");}
                 }
               	function MNline()
                  {
                        document.write("<tr><td colspan=2><HR size=1></td></tr>");
                  }
                 function MNTwo(m,n,o,p)
                 {
                       document.write("<tr><td onmouseover=\"this.className='MenuColor';\" onmouseout=\"this.className='';\" width=50%>");
                        document.write("<img src=images/blank.gif height=2 width=2><br><img src=images/blank.gif height=2 width=2><IMG SRC=Image/fl.gif WIDTH=9 HEIGHT=9 align=absmiddle BORDER=0><a href=\"");
                      if(m.substr(0,5) != "http:"){document.write("" + m + "\">" + n + "</a></td>");}
                       else{document.write(m + "\">" + n + "</a></td></tr>");}
                       
                       document.write("<td onmouseover=\"this.className='MenuColor';\" onmouseout=\"this.className='';\" width=50%>");
                         document.write("<img src=images/blank.gif height=2 width=2><br><img src=images/blank.gif height=2 width=2><IMG SRC=Image/fl.gif WIDTH=9 HEIGHT=9 align=absmiddle BORDER=0><a href=\"");
                       if(m.substr(0,5) != "http:"){document.write("" + o + "\">" + p + "</a></td></tr>");}
                       else{document.write(o + "\">" + p + "</a></td></tr>");}
                 }


			function MN2(i,m,n)
			{
				document.write("</table></td></td></tr></table></div></div>");
				document.write("<a href=\"" + m + "\" onMouseOver=\"MSHL('serve" + i + "','','show','subscibe','','hide','order','','hide','feature','','hide','defuser','','hide','spread','','hide')\" onMouseOut=\"MSHL('serve" + i + "','','hide','subscibe','','hide','order','','hide','feature','','hide','defuser','','hide','spread')\">" + n + "</a>");
			}
			function MNL(){document.write(" | ");}
			
			
			
			
function contextMenu()
{
 this.items   = new Array();
 
 this.addItem = function (item)
 {
  this.items[this.items.length] = item;
 }

 this.show = function (oDoc)
 {
  var strShow = "";
  var i;
  
  strShow = "<div id=\"rightmenu\" style=\"BACKGROUND-COLOR: #ffffff; BORDER: #000000 1px solid; LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: hidden; Z-INDEX: 10\">";
  strShow += "<table border=\"0\" height=\"";
  strShow += this.items.length * 20;
  strShow += "\" cellpadding=\"0\" cellspacing=\"0\">";
  strShow += "<tr height=\"3\"><td bgcolor=\"#d0d0ce\" width=\"2\"></td><td>";
  strShow += "<table border=\"0\" width=\"100%\" height=\"100%\" cellpadding=0 cellspacing=0 bgcolor=\"#ffffff\">";
  strShow += "<tr><td bgcolor=\"#d0d0ce\" width=\"23\"></td><td><img src=\" \" height=\"1\" border=\"0\"></td></tr></table>";
  strShow += "</td><td width=\"2\"></td></tr>";
  strShow += "<tr><td bgcolor=\"#d0d0ce\"></td><td>";
  strShow += "<table border=\"0\" width=\"100%\" height=\"100%\" cellpadding=3 cellspacing=0 bgcolor=\"#ffffff\">";
  oDoc.write(strShow);
  for(i=0; i<this.items.length; i++)
  {
   this.items[i].show(oDoc);
  }
  strShow = "</table></td><td></td></tr>";
  strShow += "<tr height=\"3\"><td bgcolor=\"#d0d0ce\"></td><td>";
  strShow += "<table border=\"0\" width=\"100%\" height=\"100%\" cellpadding=0 cellspacing=0 bgcolor=\"#ffffff\">";
  strShow += "<tr><td bgcolor=\"#d0d0ce\" width=\"23\"></td><td><img src=\" \" height=\"1\" border=\"0\"></td></tr></table>";
  strShow += "</td><td></td></tr>";
  strShow += "</table></div>\n";
  oDoc.write(strShow);
 }
}

// menu Item object
function contextItem(text, icon, cmd, type)
{
 this.text = text ? text : "";
 this.icon = icon ? icon : "";
 this.cmd = cmd ? cmd : "";
 this.type = type ? type : "menu";
 
 this.show = function (oDoc)
 {
  var strShow = "";
  
  if(this.type == "menu")
  {
   strShow += "<tr ";
   strShow += "onmouseover=\"changeStyle(this, 'on');\" ";
   strShow += "onmouseout=\"changeStyle(this, 'out');\" ";
   strShow += "onclick=\"";
   strShow += this.cmd;
   strShow += "\">";
   strShow += "<td class=\"ltdexit\" width=\"16\">";
   if (this.icon == "")
    strShow += "&nbsp;";
   else {
    strShow += "<img border=\"0\" src=\"";
    strShow += this.icon;
    strShow += "\" width=\"16\" height=\"16\" style=\"POSITION: relative\"></img>";
   }
   strShow += "</td><td class=\"mtdexit\">";
   strShow += this.text;
   strShow += "</td><td class=\"rtdexit\" width=\"5\">&nbsp;</td></tr>";
  }
  else if (this.type == "separator")
  {
   strShow += "<tr><td class=\"ltdexit\">&nbsp;</td>";
   strShow += "<td class=\"mtdexit\" colspan=\"2\"><hr color=\"#000000\" size=\"1\"></td></tr>";
  }
  
  oDoc.write(strShow);
 }
}

function changeStyle(obj, cmd)
{ 
 if(obj) try {
  var imgObj = obj.children(0).children(0);
  
  if(cmd == 'on') {
   obj.children(0).className = "ltdfocus";
   obj.children(1).className = "mtdfocus";
   obj.children(2).className = "rtdfocus";
   if(imgObj)
   {
    if(imgObj.tagName.toUpperCase() == "IMG")
    {
     imgObj.style.left = "-1px";
     imgObj.style.top = "-1px";
    }
   }
  }
  else if(cmd == 'out') {
   obj.children(0).className = "ltdexit";
   obj.children(1).className = "mtdexit";
   obj.children(2).className = "rtdexit";
   if(imgObj)
   {
    if(imgObj.tagName.toUpperCase() == "IMG")
    {
     imgObj.style.left = "0px";
     imgObj.style.top = "0px";
    }
   }
  }
 }
 catch (e) {}
}

function showMenu()
{
 var x, y, w, h, ox, oy;
 
 x = event.clientX;
 y = event.clientY;
 
 var obj = document.getElementById("rightmenu");
 if (obj == null)
  return true;
 
 ox = document.body.clientWidth;
 oy = document.body.clientHeight;
 if(x > ox || y > oy)
  return false;
 w = obj.offsetWidth;
 h = obj.offsetHeight;
 if((x + w) > ox)
   x = x - w;
 if((y + h) > oy)
  y = y - h;
 
 obj.style.posLeft = x + document.body.scrollLeft;
 obj.style.posTop = y + document.body.scrollTop;
 obj.style.visibility = "visible";
 
 return false;
}
function hideMenu()
{
 if(event.button == 0)
 {
  var obj = document.getElementById("rightmenu");
  if (obj == null)
   return true;
  obj.style.visibility = "hidden";
  obj.style.posLeft = 0;
  obj.style.posTop = 0;
 }
}

function writeStyle()
{
 var strStyle = "";
 
 strStyle += "<STYLE type=text/css>";
 strStyle += "TABLE {Font-FAMILY: \"Tahoma\",\"Verdana\",\"宋体\"; FONT-SIZE: 9pt}";
 strStyle += ".mtdfocus {BACKGROUND-COLOR: #ccccff; BORDER-BOTTOM: #000000 1px solid; BORDER-TOP: #000000 1px solid; CURSOR: hand}";
 strStyle += ".mtdexit {BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid}";
 strStyle += ".ltdfocus {BACKGROUND-COLOR: #ccccff; BORDER-BOTTOM: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; CURSOR: hand}";
 strStyle += ".ltdexit {BACKGROUND-COLOR: #d0d0ce; BORDER-BOTTOM: #d0d0ce 1px solid; BORDER-TOP: #d0d0ce 1px solid; BORDER-LEFT: #d0d0ce 1px solid}";
 strStyle += ".rtdfocus {BACKGROUND-COLOR: #ccccff; BORDER-BOTTOM: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; CURSOR: hand}";
 strStyle += ".rtdexit {BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BORDER-RIGHT: #ffffff 1px solid}";
 strStyle += "</STYLE>";
 
 document.write(strStyle);
}

function makeMenu()
{
 var myMenu, item;
 
 var homepage_cmd = "this.style.behavior='url(#default#homepage)';this.setHomePage('http://localhost:8989/marketing/'); return false;";
 var favorate_cmd = "window.external.addFavorite('http://localhost:8989/marketing/','北京华夏新达科技股份有限公司销售管理系统'); return false;";
 var viewcode_cmd = "window.location = 'view-source:'+'http://www.qpsh.com/";
 
 myMenu = new contextMenu();
 
 item = new contextItem("返回主页", "Image/BD14581_.gif", "location.href='menu.html'", "menu");
 myMenu.addItem(item);
 
 item = new contextItem("设为主页", "Image/demo.gif", homepage_cmd, "menu");
 myMenu.addItem(item);
 
 item = new contextItem("添加到收藏夹", "Image/imgfolder.gif", favorate_cmd, "menu");
 myMenu.addItem(item);
 
 item = new contextItem("联系作者", "Image/friends.gif", "location.href='http://www.xfaccp.com'", "menu");
 myMenu.addItem(item);
 
 item = new contextItem("", "", "", "separator");
 myMenu.addItem(item);
 
 item = new contextItem("退出系统", "Image/delete.gif", "location.href='menu.html'", "menu");
 myMenu.addItem(item);
 
 myMenu.show(this.document);

 delete item;
 delete myMenu;
}

function toggleMenu(isEnable)
{
 if(isEnable)
  document.oncontextmenu = showMenu;
 else
  document.oncontextmenu = new function() {return true;};
}

writeStyle();
makeMenu();
document.onclick = hideMenu;
document.oncontextmenu = showMenu;
file:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -