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

📄 maintool.js

📁 电信的网厅的整站代码
💻 JS
字号:
// JScript File
function mainInitPage() {
    // 初始化页面。
    if ( self.parent == self && self.opener == undefined && ( window.dialogArguments == undefined || window.dialogArguments == null ) ) {
        // 当前页面不是针内页面,也不是被脚本打开的页面。程序要转到相应的帧下。
        var currPage = document.location.href;
        if (currPage.length > 8 && currPage.substr(0,8) == "https://" ){
            // HTTPS链接,去掉头。
            currPage = currPage.substr(8);
            var re = new RegExp("/","i");
            var firstPath = currPage.search(re);
            if ( firstPath != -1 ) {
                currPage = currPage.substr(firstPath);
            }
        }
        else if ( currPage.length > 7 && currPage.substr(0,7) == "http://") {
            // HTTP 链接,去掉头。
            currPage = currPage.substr(7);
            var re = new RegExp("/","i");
            var firstPath = currPage.search(re);
            if ( firstPath != -1 ) {
                currPage = currPage.substr(firstPath);
            }
        }
        
        document.location.replace("/manager/view/index.jsp?page=" + encodeURIComponent(currPage));
    }
}

// 执行公共的页面初始化操作。
mainInitPage();


// 全局接口调用方法。
function _menuReload(menuIdx, id){
    if ( window.top.menuReload != undefined ) {
        return window.top.menuReload(menuIdx, id);
    }
    else {
        return false;
    }
}

function _menuAdd(menuIdStr, menuTitle, menuService, menuMethod){
	if ( window.top.addOtherMenu != undefined ) {
		return window.top.addOtherMenu(menuIdStr, menuTitle, menuService, menuMethod);
	}
	else {
		return false;
	}
}

function _menuAdd(menuIdStr, menuTitle, menuService, menuMethod, initID){
	if ( window.top.addOtherMenu != undefined ) {
		return window.top.addOtherMenu(menuIdStr, menuTitle, menuService, menuMethod, initID);
	}
	else {
		return false;
	}
}

function _menuRemove(menuIdStr) {
	if ( window.top.removeOtherMenu != undefined ) {
		return window.top.addOtherMenu(menuIdStr, menuTitle, menuService, menuMethod);
	}
	else {
		return false;
	}
}

function _getMenuIndex(menuIdStr) {
	if ( window.top.getMenuIndex != undefined ) {
		return window.top.getMenuIndex(menuIdStr);
	}
	else {
		return -1;
	}
}

function _selectedMenu(menuIdx) {
	if ( window.top.selectedMenu != undefined ) {
		return window.top.selectedMenu(menuIdx);
	}
	else {
		return -1;
	}
}

function _reloadTopServiceCount(serviceName){
	if ( window.top.topLoadServiceCount != undefined ) {
		return window.top.topLoadServiceCount(serviceName);
	}
	else {
		return -1;
	}
}

function _showMenuPanel(menuIdStr) {
	if ( window.top.showMenuPanel != undefined ) {
		return window.top.showMenuPanel("menuList_" + menuIdStr);
	}
}


function windowOpen(sURL,iWidth,iHeight,aName) {
	if ( iWidth == null ) iWidth = 400;
	if ( iHeight == null ) iHeight = 300;
	if ( aName == null ) aName = "_blank";

    var vLeft = ( screen.width -  iWidth ) / 2 ;
    var vTop = ( screen.height - iHeight ) / 2 ;
    var m_strFeatures = "Height= " + iHeight + ", Width= " + iWidth + ", ";
    m_strFeatures += "Top= " + vTop + ", ";
    m_strFeatures += "Left=" +vLeft + ", ";
    m_strFeatures += "resizable=1, scrollbars=0, status=0,";
    m_strFeatures += "fullscreen=0,";
    m_strFeatures += "channelmode=0, ";
    m_strFeatures += "directories=0, ";
    m_strFeatures += "location=0, ";
    m_strFeatures += "menubar=0, ";
    m_strFeatures += "titlebar=0, ";
    m_strFeatures += "toolbar=0";

    var vWindow = window.open(sURL,aName ,m_strFeatures);
    if ( vWindow != null )
	    vWindow.focus();
    
    return vWindow;
}

function showModelDailog(sURL, iWidth, iHeight) {
	var sFeature = "dialogHeight: " + iHeight + "px;";
	sFeature += " dialogWidth: " + iWidth + "px;";
	sFeature += " edge: Raised;";
	sFeature += " center: Yes;";
	sFeature += " help: No;";
	sFeature += " resizable: No;";
	sFeature += " status: No;";

	var oWindow = window.showModalDialog(sURL, window, sFeature);
	return oWindow;
}

⌨️ 快捷键说明

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