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

📄 tabmenu.js

📁 BI经营分析系统基于Hyperion Analyzer 前端展现层完整代码
💻 JS
字号:
function fnTabClick(nTab)	{
    setCookie(nTab);
	nTab = parseInt(nTab);
	var oTab;
	var prevTab = nTab-1;
	var nextTab = nTab+1;
	//event.cancelBubble = true;
	//el = event.srcElement;

	for (var i = 0; i < newsContent.length; i++){
		oTab = tabs[i];
		oTab.className = "clsTab";
		oTab.style.borderLeftStyle = "";
		oTab.style.borderRightStyle = "";
		newsContent[i].style.display = "none";
	}	
	newsContent[nTab].style.display = "block";
	tabs[nTab].className = "clsTabSelected";
	oTab = tabs[nextTab];
	if (oTab) oTab.style.borderLeftStyle = "none";
	oTab = tabs[prevTab];
	if (oTab) oTab.style.borderRightStyle = "none";
	// event.returnValue = false;
	return false;
}

var DocCookie = document.cookie;
var cName ;
var today = new Date();
var expiration = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000);

function getCookie() {
	var index = DocCookie.indexOf(cName + "=");	
	if (index == -1) return '0';
	index = DocCookie.indexOf("=", index) + 1;
	var endstr = DocCookie.indexOf(";", index);
	if (endstr == -1) endstr = DocCookie.length;
	var ICookie = unescape(DocCookie.substring(index, endstr));
	if (ICookie == null || ICookie == "null" || ICookie == "" || ICookie.indexOf("undefined") >= 0 || ICookie.lastIndexOf("=") == ICookie.length - 1) {
		ICookie = '0';
	}
	return ICookie;
}

function iniTab(PageName){
   cName=PageName;    
   fnTabClick(getCookie());
}

function setCookie(Props) {
		document.cookie = cName + "=" + Props + "; path=/; expires=" + expiration.toGMTString()
		DocCookie = document.cookie;  	
	}

⌨️ 快捷键说明

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