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

📄 js.aspx

📁 WAV文件的格式官方宝典
💻 ASPX
📖 第 1 页 / 共 2 页
字号:

var mnpMenuTop = null;
var mnpMenuKill = null;
var mnpMenuPopup = null;
var mnpMenuUrl = null;
var mnpMenuParent = null;
var mnpMenuScrollTimer = null;
var mnpMenuShadows = new Array();
var mnpMenuDirSave = "LTR";
var mnpMenuCTSave = false;

window.attachEvent("onload", mnpMenuInit);

function mnpMenuInit()
{
	try
	{
		mnpMenuDirSave = mnpMenuDir();
		mnpMenuCTSave = mnpMenuCT();
	}
	catch(e)
	{
		return;
	}
	mnpMenuTop = document.getElementById("mnpMenuTop");
	mnpMenuUrl = mnpMenuTop.getAttribute("url");
	mnpMenuParent = mnpMenuTop.getAttribute("parent");
	mnpMenuAttach(mnpMenuTop);
}

function mnpPage(label, url, target, menu, linkID)
{
	this.label = label;
	this.url = url;
	this.target = target;
	this.menu = menu;
	this.linkID = linkID;
}

function mnpLabel(label)
{
	this.label = label;
}

function mnpMenuEnter()
{
	if (mnpMenuKill)
	{
		window.clearTimeout(mnpMenuKill);
		mnpMenuKill = null;
	}
}

function mnpMenuLeave()
{
	mnpMenuKill = window.setTimeout("mnpMenuKiller()", 200);
}

function mnpMenuKiller()
{
	mnpKillMenu(mnpMenuTop.getAttribute("currentMenu"));
	mnpMenuTop.removeAttribute("currentMenu");
}

function mnpMenuAttach(el)
{
	el.attachEvent("onmouseenter", mnpMenuEnter);
	el.attachEvent("onmouseleave", mnpMenuLeave);
	var divs = el.getElementsByTagName("DIV");
	for (var i=0; i < divs.length; i++)
	{
		var div = divs.item(i);
		if (div.className == "mnpMenuRow")
		{
			div.attachEvent("onmouseenter", mnpMenuMouseover);
			div.attachEvent("onmouseleave", mnpMenuMouseout);
			div.attachEvent("onmousedown", mnpMenuMousedown);
			div.attachEvent("onmouseup", mnpMenuMouseup);
			div.setAttribute("save-background", div.style.background);
			div.setAttribute("save-border", div.style.borderColor);
			var a = div.getElementsByTagName("A");
			if (a.length > 0)
			{
				var a0 = a[0];
				if (a0.getAttribute("aoff"))
					a0.outerHTML = a0.innerHTML;
				else
				{
					div.setAttribute("status", a0.href);
					div.attachEvent("onclick", mnpMenuClick);
				}
			}
			if (div.getAttribute("menu"))
			{
				var imgs = div.getElementsByTagName("IMG");
				if (imgs.length > 0)
				{
					var img = imgs[0];
					img.style.visibility = "visible";
				}
				else
				{
					var x;
					if (mnpMenuDirSave == "LTR")
						x = (div.offsetWidth - 10) + "px";
					else if (mnpMenuTop.contains(div))
						x = "4px";
					else
						x = "6px";
					var img = "<IMG src='/library/mnp/2/gif/arrow" + mnpMenuDirSave + ".gif' width='4' height='7' border='0' class='mnpMenuArrow' style='left: " + x + "' />";
					div.insertAdjacentHTML("afterBegin", img);
				}
			}
		}
	}
}

function mnpMenuClick()
{
	var div = window.event.srcElement;
	var a = div.getElementsByTagName("A");
	if (a.length == 0) return;
	if (window.event.shiftKey)
	{
		var target = a[0].target;
		a[0].target = "_new";
		a[0].click();
		a[0].target = target;
	}
	else
		a[0].click();
}

function mnpKillMenu(id)
{
	if (id == null) return;
	var menu = document.getElementById(id);
	var current = menu.getAttribute("currentMenu");
	if (current) 
	{
		mnpKillMenu(current);
		menu.removeAttribute("currentMenu");
	}
	var temp = mnpMenuShadows[id];
	if (temp)
	{
		var i;
		for (i=1; i<=4; i++)
			document.body.removeChild(temp[i]);
		mnpMenuShadows[id] == null;
	}
	var parent = document.getElementById(menu.getAttribute("parentMenu"));
	var rows = parent.getElementsByTagName("DIV");
	for (var i=0; i<rows.length; i++)
	{
		var row = rows.item(i);
		var m = row.getAttribute("menu");
		if (m == id)
		{
			row.style.background = row.getAttribute("save-background");
			row.style.borderColor = row.getAttribute("save-border");
		}
	}
	show_elements("SELECT", menu);
	show_elements("OBJECT", menu);
	menu.style.display = "none";
}

function mnpMenuOpen(id, parentId, x, y)
{
	var parent;
	try
	{
		parent = document.getElementById(parentId);
	}
	catch(e)
	{
		return;
	}
	var current = parent.getAttribute("currentMenu");
	if (id == current) return;
	mnpKillMenu(current);
	if (id)
		parent.setAttribute("currentMenu", id);
	else
	{
		parent.removeAttribute("currentMenu");
		return;
	}
	
	var div = document.getElementById(id);
	if (div == null)
	{
		var menu = eval("new " + id + "()");
		var html = "<DIV id='" + id + "' class='mnpMenuSub' dir='" + mnpMenuDirSave + "'>";
		html += "<DIV class='mnpMenuScroller' style='display: none; background: #F1F1F1; border-color: #F1F1F1' onmouseenter='mnpStartScroll(-1)' onmouseleave='mnpStopScroll()'><IMG src='/library/mnp/2/gif/up_disabled.gif' width='7' height='9' /></DIV>";
		html += "<DIV class='mnpMenuScrollArea'>";
		var isThisPage = false;
		for (var i=0; i<menu.items.length; i++)
		{
			var item = menu.items[i];
			var url = item.url;
			if (url == mnpMenuUrl)
			{
				isThisPage = true;
				break;
			}
		}
		for (var i=0; i<menu.items.length; i++)
		{
			var item = menu.items[i];
			var label = item.label;
			var url = item.url;
			var target = item.target;
			var submenu = item.menu;
			var linkID = item.linkID;
			html += "<DIV";
			if (submenu)
				html += " menu='" + submenu + "'";
			if (url)
			{
				html += " class='mnpMenuRow'";
				if (url == mnpMenuUrl)
					html += " style='border-color: #999999; background: white; cursor: default";
				else if (!isThisPage && (url == mnpMenuParent))
					html += " style='border-color: #999999; background: #F1F1F1";
				else
					html += " style='border-color: #F1F1F1; background: #F1F1F1";
				if (mnpMenuDirSave == "LTR")
					html += "; padding-left: 11px";
				else
					html += "; padding-right: 11px";
				html += "'";
			}
			else
				html += " class='mnpMenuLabel'";
			html += ">";
			if (url && (url != mnpMenuUrl))
			{
				var targetAttr = target == "" ? "" : " target='" + target + "'";
				if (mnpMenuCTSave)
					html += "<A href='" + url + "'" + targetAttr + " LinkArea='Left Nav' LinkID='Flyout" + linkID + "' onclick='trackInfo(this)'>" + label + "</A>";
				else
					html += "<A href='" + url + "'" + targetAttr + ">" + label + "</A>";
			}
			else
				html += "<SPAN>" + label + "</SPAN>";
			html += "</DIV>";
		}
		html += "</DIV>";
		html += "<DIV class='mnpMenuScroller' style='display:none; background: #F1F1F1; border-color: #F1F1F1' onmouseenter='mnpStartScroll(+1)' onmouseleave='mnpStopScroll()'><IMG src='/library/mnp/2/gif/down_enabled.gif' width='7' height='9' /></DIV>";
		html += "</DIV>";
		document.body.insertAdjacentHTML("beforeEnd", html);
		var div = document.getElementById(id);
		var sa = div.childNodes.item(1);
		var max = 0;
		for (var i=0; i<sa.childNodes.length; i++)
		{
			var it = sa.childNodes.item(i).childNodes.item(0);
			var w = it.offsetWidth;
			if (w > max) max = w;
		}
		max += 34;
		if (max < 100) max = 100;
		else if (max > 410) max = 410;
		div.style.width = max + "px";
		for (var i=0; i<sa.childNodes.length; i++)
		{
			var it = sa.childNodes.item(i);
			if (it.className == "mnpMenuRow")
				it.style.width = (max - 6) + "px";
		}
		mnpMenuAttach(div);
		div.setAttribute("parentMenu", parentId);
	}
	else
	{
		div.style.display = "";
	}
	var bodyHeight = document.body.clientHeight;
	var bodyTop = document.body.scrollTop;
	var bodyWidth = document.body.clientWidth;
	var bodyLeft = document.body.scrollLeft;
	var up = div.children.item(0);
	var box = up.nextSibling;
	var down = box.nextSibling;
	up.style.display = "none";
	down.style.display = "none";
	box.style.height = "";
	if (div.offsetHeight > bodyHeight)
	{
		up.style.display = "";
		up.childNodes.item(0).src = "/library/mnp/2/gif/up_disabled.gif";
		down.style.display = "";
		down.childNodes.item(0).src = "/library/mnp/2/gif/down_enabled.gif";
		box.style.height = (bodyHeight - up.offsetHeight - down.offsetHeight - 6) + "px";
	}
	var bodyBottom = bodyTop + bodyHeight;
	if (y + div.offsetHeight > bodyBottom)
		y -= div.offsetHeight - 25;
	if (y < bodyTop)
		y = bodyTop + (bodyHeight - div.offsetHeight) / 2;
	if (mnpMenuDirSave == "RTL")
		x -= div.offsetWidth;
	div.style.left = x + "px";
	div.style.top = y + "px";
	div.style.zIndex = parent.style.zIndex + 10;
	if (div.offsetLeft + div.offsetWidth > bodyWidth + bodyLeft)
		document.body.scrollLeft = div.offsetLeft + div.offsetWidth - bodyWidth;
	mnpMenuShadows[id] = mnpMenuShadow(div, "#666666", 4);
	hide_elements("SELECT", div);
	hide_elements("OBJECT", div);
}

function mnpMenuPt(el)
{
	this.left = 0;
	this.top = 0;
	while (el)
	{
		this.left += el.offsetLeft;
		this.top += el.offsetTop;
		el = el.offsetParent;
	}
}

function mnpMenuMouseover()
{
	var div = window.event.srcElement;
	var status = div.getAttribute("status");
	if (status) window.status = status;
	div.style.background = "#CCCCCC";
	div.style.borderColor = "#999999";
	var pt = new mnpMenuPt(div);
	var x;
	if (mnpMenuDirSave == "LTR")
		x = pt.left + div.offsetWidth - 1;
	else
		x = pt.left + 2;
	var y = pt.top - 3;
	var menu = div.getAttribute("menu");
	if (menu)
		menu = "'" + menu + "'";
	else
		menu = "null";
	if (mnpMenuPopup)
		window.clearTimeout(mnpMenuPopup);
	var parent = div.parentElement.parentElement;
	mnpMenuPopup = window.setTimeout("mnpMenuOpen(" + menu + ", '" + parent.id + "', " + x + ", " + y + ")", 200);
}

function mnpMenuMouseout()
{
	var div = window.event.srcElement;
	window.status = "";
	var menu = div.getAttribute("menu");
	if (menu != null && menu == div.parentElement.parentElement.getAttribute("currentMenu"))
	{

⌨️ 快捷键说明

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