navbar.js

来自「一个比较完整的企业erp系统」· JavaScript 代码 · 共 83 行

JS
83
字号
function moveleft(mask,menu){
if(mask&&menu){
menuwidth = mask.offsetWidth
actualwidth=menu.offsetWidth
if (document.all&&menu.style.pixelLeft>(menuwidth-actualwidth))
menu.style.pixelLeft-=150
}
}

function moveright(mask,menu){
if(mask&&menu){
menuwidth = mask.offsetWidth
actualwidth=menu.offsetWidth
if(document.all&&menu.style.pixelLeft<0)
menu.style.pixelLeft+=150
}
}

orgButton = null
orgBar = null

function clickbutton(){
  //alert()
  ele = window.event.srcElement
   while(ele){
		if(ele.tagName=="TABLE"){				
					break;
		}
		ele=ele.parentElement;
	}

//==================================================
  CurrBtn = ele
  CurrBar = ele.parentElement
  
   if(CurrBtn.state=="off"){
    if(orgButton!=null){
      orgButton.state = "off"
      orgButton.className = "ButtonNM" 
      orgBar.className = "BarTDNM" 
   }
    orgButton = CurrBtn
    orgBar = CurrBar 
    
    CurrBtn.className="ButtonClk"
    CurrBar.className="BarTDClk"
    CurrBtn.state = "on"
  }
}


function changeCss(){
    ele = window.event.srcElement
   while(ele){
		if(ele.tagName=="TABLE"){				
					break;
		}
		ele=ele.parentElement;
	}
   obj= ele
  if(obj.state=="off"){
  obj.orgclassName = obj.className
  obj.className = "ButtonHL"
  }
}
function reCss(){
    ele = window.event.srcElement
   while(ele){
		if(ele.tagName=="TABLE"){				
					break;
		}
		ele=ele.parentElement;
	}
   obj= ele
  if(obj.state=="off"){
  obj.className = obj.orgclassName
  }
}

function fnShow(obj){
  url = obj.Url
  window.frames("main").location.href = url + "?ID=" + document.form1.ID.value
}

⌨️ 快捷键说明

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