menu1.js

来自「是一个应用型java网站例子」· JavaScript 代码 · 共 69 行

JS
69
字号
var ns4 = navigator.appName.indexOf("Netscape") != -1 && navigator.appVersion.charAt(0) >= 3
var ie4 = navigator.appName.indexOf("Microsoft Internet Explorer") != -1 && navigator.appVersion.charAt(0) >= 4
// ---- Initial Values ----
var onMousedLayer = '';
self.name = "cxhome";
// ------------------------
function rollOver(NAME){
	imagesON = eval(NAME + "_on.src");
	document.images[NAME].src= imagesON;
}
function rollOut(NAME){
	imageOFF = eval(NAME + "_off.src");
	document.images[NAME].src= imageOFF;
}
function showLayer(NAME){
	if (onMousedLayer != '') {
		hideLayer(onMousedLayer);
	}
	if (ns4) {
		if (document.layers[NAME] != null) {
			document.layers[NAME].visibility = "show";
			onMousedLayer = NAME;
		}
	}
	if (ie4) {
		if (document.all[NAME] != null) {
			document.all[NAME].style.visibility = "visible";
			onMousedLayer = NAME;
		}
	}	
}
function hideLayer(NAME){
	if (ns4) {
		if (document.layers[NAME] != null) {
			document.layers[NAME].visibility = "hide";
		}
	}
	if (ie4) {
		if (document.all[NAME] != null) {
			document.all[NAME].style.visibility = "hidden";
		}
	}
}
function popUpWin(url, x, y) {
	if (x == null || y == null) {
		var newWin = window.open(url, '');
	} else {
		eval ("window.open(url, 'Popup', 'width="+x+",height="+y+",,resizable=1,scrollbars=1');")
	}	
}
function popUpWinWithStatus(url, x, y) {
	if (x == null || y == null) {
		var newWin = window.open(url, '');
	} else {
		eval ("window.open(url, 'Popup', 'width="+x+",height="+y+",,resizable=1,scrollbars=1,status=1');")
	}	
}
function popWindow(url,winName) { //v2.0
	if (url != "")
		var w = window.open(url,winName,'width=640,height=400,scrollbars=1,resizable=0,status=0,menubar=0,fullscreen=0');
}

function popUpWinWithToolbar(url, x, y) {
	if (x == null || y == null) {
		var newWin = window.open(url, '');
	} else {
		eval ("window.open(url, 'Popup', 'width="+x+",height="+y+",,toolbar=yes,location=yes,resizable=1,scrollbars=1');")
	}	
}

⌨️ 快捷键说明

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