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

📄 showloclist.js

📁 一个由B/S做的宠物医院
💻 JS
字号:
function getElement(aID)
{
  return (document.getElementById) ? document.getElementById(aID)
                                   : document.all[aID];
}

function showLocSelect()
{
	var locdiv=getElement("locListDiv");
	if(locdiv.style.display=="block"){
		locdiv.style.display="none";
		return;
	}
	locdiv.style.display="block";
	var locs=locdiv.getElementsByTagName("li");
	for(var i=0;i<locs.length;i++)
	{
		var theloc=locs[i];
			theloc.onmouseover=function(){
				this.style.backgroundColor="#A0AAC8"
			}
			theloc.onmouseout=function(){
				this.style.backgroundColor="#F2F6FB"
			}
			theloc.onclick=function(){
				var locstr=this.innerHTML;
				if (locstr.indexOf(" ")!=-1) locstr=locstr.substr(0,locstr.indexOf(" ")); 
				hideLocSelect();
				var l=getElement("locbar");
				loadAJAXTab(l.getAttribute("urn"),l.getAttribute("rel"));			
			}
	}
}
function IsChild(cNode,pNode){
	while(cNode!=null){
		cNode=cNode.parentNode;
		if(cNode==pNode) return true; 
	}
	return false;
}
function hideLocSelect()
{	
	getElement("locListDiv").style.display="none";
}
document.onmousedown=function(aEvent){
	var myEvent = window.event ? window.event : aEvent;
	var lo=getElement("locListDiv");
	if(!IsChild(myEvent.srcElement,lo))hideLocSelect();
}

⌨️ 快捷键说明

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