变量定义法 True/False 全屏窗口

来源:互联网 发布:自动统计数字表格软件 编辑:程序博客网 时间:2024/06/04 00:58
  var ChooseBtnStatu = true;        function changeWindows() {            var ChooseBtn = document.getElementById('ChooseBtn');            var barLeftParent = window.frames['myIframe'].document.getElementById("bar_left");            if (ChooseBtnStatu == true) {                $("#showNav").hide();                //$("#ChooseBtnText").text("全屏");                ChooseBtn.style.backgroundImage = 'url(../../App_Themes/Default/custom/images/windowMode.png)';                $("#ChooseBtn").attr("title", "退出全屏")                changeBig();                document.getElementById('iframeWidth').style.marginLeft = "0";                //                window.frames['myIframe'].document.getElementById("")                   ChooseBtnStatu = false;            } else {                $("#showNav").show();                // $("#ChooseBtnText").text("窗口");                ChooseBtn.style.backgroundImage = 'url(../../App_Themes/Default/custom/images/fullscreen.png)';                $("#ChooseBtn").attr("title", "点击全屏")                reset();                //                if (barLeftParent) {                //                    barLeftParent.style.marginBottom = "26px";                //                }                document.getElementById('iframeWidth').style.marginLeft = "5px";                ChooseBtnStatu = true;            }            barLeftParent = null;        }        function reset() {            $("#west").removeClass("westMarginLeft");            $(".layout-panel-north").css({ "height": northHeight, "min-height": "75px" });            $(".layout-panel-center").css({                "width": windowWidth - $("#west").width(),                "height": windowHeight - northHeight + 13,                "min-height": windowHeight - $(".layout-panel-north").height() + 13,                "left": $("#west").width(),                "top": 75            });            $(".layout-panel-center .transparent").css({                "width": windowWidth - $("#west").width(),                "height": windowHeight - northHeight + 13            });            //window.frames['myIframe'].document.getElementById("bar_left").style.marginBottom = "100px";            myIframe.window.location.reload();        }        var windowWidth = $(window).width();        var windowHeight = $(window).height();        var northHeight = windowHeight * 0.0939;        var westWidth = windowWidth * 0.125;        var westHeight = windowWidth - 75;        //全屏后改变的高宽        function changeBig() {            $(".layout-panel-west").css("width", "0");            $(".layout-panel-north").css({ "height": "0", "min-height": "0" });            $(".layout-panel-center").css({                "width": windowWidth,                "height": windowHeight,                "left": "0",                "top": "0",                "margin-top": 0            });            $(".transparent").css({                "width": windowWidth,                "height": windowHeight            });            //            top.frames['myIframe'].location.reload();        }

全部代码

<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server">    <title id="title"></title>        <!--<meta http-equiv="X-UA-Compatible" content="IE=edge"/>-->        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>        <meta http-equiv="pragma" content="no-cache"/>         <meta http-equiv="Cache-Control" content="no-cache, must-revalidate"/>         <meta http-equiv="expires" content="0"/>        <meta name="viewport" content="width=device-width, initial-scale=1"/>    <link rel="stylesheet" type="text/css" href="../../App_Themes/Default/all.css"  />    <!--<link rel="stylesheet" type="text/css" media="screen and (min-width:2400px;)" href="../../App_Themes/Default/big_fullscreen.css"  />-->    <link rel="stylesheet" href="../../Content/ZtreeStyle/css/zTreeStyle/zTreeStyle.css" type="text/css"/>    <style type="text/css">        body        {            background: #2AA1FB;        }        /*accordion style********************************************************/        .accordion        {            background-color: transparent;            border: 0;            font-family: '宋体' , '幼圆' , '黑体';            letter-spacing: 2;        }        .accordion .accordion-header        {            background: transparent url(../../App_Themes/MapTheme/custom/images/my-accordion-body.png) no-repeat 100% 50%;            color: #fff;            border: 0;        }        .accordion .accordion-header-selected        {            /**/background: url(../../App_Themes/MapTheme/custom/images/accordion-header-selected.png) no-repeat 0 0;            color: #F1FFAE;        }        /*accordion-header重写*/        .my-accordion-body        {            filter: chroma(color= #FF2222);            scrollbar-face-color: #FF2222;            scrollbar-shadow-color: #FF2222;            scrollbar-highlight-color: #8CB1D9;            scrollbar-3dlight-color: #8CB1D9;            scrollbar-darkshadow-color: #FF2222;            scrollbar-arrow-color: #FF2222;            scrollbar-base-color: #FF2222;            scrollbar-track-color: #FF2222;        }        .txt{font-family:"微软雅黑"!important;}        #north{min-height:75px;}        #west{background-color:#fff;}        /*.ztree        {            background-color:#83C0E3;            }*/        .layout-button-left{display:none!important;}/*隐藏菜单折叠*/        .info-custom>a{width: 100px;height:65px;text-align: center;display:inline-block;border-left:1px solid #FFFFFF;margin:5px 0 0 0;color:#fff;font-family:'微软雅黑';}        #toindex{float:left;}        #outindex{float: right;}        .info-custom i{width:100%;height:24px;display:inline-block;margin:5px 0 0 0;}        .info-custom span{width:100%;height:30px;line-height:30px;font-size:16px;font-family:"微软雅黑";text-align:center;}        #toindex>i{background:url(../../App_Themes/Default/custom/images/toindex.png) no-repeat center center;}        #outindex>i{background:url(../../App_Themes/Default/custom/images/outindex.png) no-repeat center center;}        #toindex:hover,#outindex:hover{opacity:.8;}        .panel-header{background-image:none;border-top-right-radius:10px;}        .my-west-header .panel-title{margin-left:18%;}        .ztree li ul li a:hover{color:#67B2F5;background-color:#DCE0E3;}        .ztree li ul li a:hover .ztree li span.button.icon03_ico_docu{margin-right:15px;margin-left:10px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/cur17.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}       /* .ztree li ul li a:hover{width:16px;height:16px; background:url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/cur17.png) no-repeat;}*/       /* .ztree li ul li:first-child{display:none;}*/        .ztree li ul li a{ width:100%;}        .ztree li ul{padding:0;}     .ztree li span.button { height:20px !important;background-image:url("../Content/images/left_menuForOutLook.png"); *background-image:url("../Content/images/left_menuForOutLook.gif") }     .ztree li span.switch{display:none;}       .ztree li span.button.noline_open {background-position: 0 0;}       .ztree li span.button.noline_close {background-position: -18px 0;}       .ztree li span.button.noline_open.level0 {background-position: 0 -18px;}       .ztree li span.button.noline_close.level0 {background-position: -18px -18px;}       .ztree li a:hover{text-decoration:none;}        /**/.ztree li span.button.pIcon01_ico_open, .ztree li span.button.pIcon01_ico_close{margin-right:15px;margin-left:10px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/14.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}        .ztree li span.button.pIcon02_ico_open, .ztree li span.button.pIcon02_ico_close{margin-right:15px; margin-left:10px;background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/13.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}        .ztree li span.button.pIcon03_ico_open, .ztree li span.button.pIcon03_ico_close{margin-right:15px;margin-left:10px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/15.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}        .ztree li span.button.pIcon04_ico_open, .ztree li span.button.pIcon04_ico_close{margin-right:15px;margin-left:10px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/16.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}        .ztree li span.button.pIcon05_ico_open, .ztree li span.button.pIcon05_ico_close{margin-right:15px;margin-left:10px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/11.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}        .ztree li span.button.icon02_ico_open, .ztree li span.button.icon02_ico_close{margin-right:15px;margin-left:10px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/18.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}        .ztree li span.button.Icon01_ico_docu{margin-right:15px;margin-left:10px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/10.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}        .ztree li span.button.icon03_ico_docu,.ztree li span.button.icon02_ico_docu{margin-bottom:-4px; margin-right:10px;margin-left:43px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/17.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}       .ztree li span.button.icon03_ico_open,.ztree li span.button.icon03_ico_close{margin-right:15px;margin-left:10px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/maps.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}       .ztree li span.button.icon4_ico_docu{margin-right:15px;margin-left:10px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/maps.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}       .ztree li{border-bottom:1px solid #ccc;}       .westMarginLeft{margin-left:-250px;}        .ztree li a span{margin-top:-8px !important; color:#5cb3ff;}        .ztree li:hover a span{ color:#fff;}         .ztree li ul li a span{ color:#5f6062 !important;}        .ztree li ul li a{ padding:0 !important;}         /**/ @media \0screen        {          #iframeWidth{width:100% !important;overflow:hidden;}            .ztree li{ margin:0; list-style:none; line-height:40px !important; text-align:left; white-space:nowrap; outline:0}         .ztree li a {padding:13px 3px 0 0 !important; margin:0; cursor:pointer; height:40px;color:#333; background-color: transparent;text-decoration:none; vertical-align:top; display: inline-block; }         .ztree li a span{font-size:20px !important;font-family:"微软雅黑" !important; margin-top:-10px !important;line-height:25px !important;}         .ztree li ul li a{ width:100%; height:35px !important; padding-top:10px !important;}            .ztree li ul li a span{ color:#5f6062 !important;font-size:18px !important;}            .ztree li span.button.icon03_ico_docu,.ztree li span.button.icon02_ico_docu{ margin-right:10px !important;margin-left:43px !important;}       }         /* 1280*1024 || 1280*800 || 1280*854     @media only screen and (max-width: 1280px)         {             }        */       /*1366*768适配*/    @media only screen and (max-width: 1366px)         {              #iframeWidth{width:100% !important;overflow:hidden;}           .ztree *{font-size:15px;font-family:"微软雅黑";}            .ztree li span,.ztree li a{height:44px;line-height:44px;}           .panel-title{font-size:15px;line-height:15px;color:#fff;}        }       /*1600*900适配*/     @media only screen and (min-width: 1367px) and (max-width: 1600px)         {           #iframeWidth{width:100% !important;overflow:hidden;}           .ztree *{font-size:20px;font-family:"微软雅黑";}           .ztree li span,.ztree li a{height:44px;line-height:44px;}           .ztree li a{padding:5px 0 5px 0;}            .panel-title{font-size:20px;line-height:22px;color:#fff;}            .ztree li ul li a span{ font-size:18px;}        }      /*1920*1080适配*/     @media only screen and (min-width: 1601px) and (max-width: 1920px)         {           #iframeWidth{width:100% !important;overflow:hidden;}           .ztree *{font-size:20px;font-family:"微软雅黑";}           .ztree li span,.ztree li a{height:44px;line-height:44px;}           .ztree li a{padding:5px 0 5px 0;}            .panel-title{font-size:20px;line-height:22px;color:#fff;}            .ztree li ul li a span{ font-size:18px;}        }          /*2K屏 2560×1600(WQXGA),2560×1440(Quad HD) */     @media only screen and (min-width: 1921px) and (max-width: 2560px)        {           .ztree *{font-size:24px;font-family:"微软雅黑";}           .ztree li span,.ztree li a{height:44px;line-height:44px;}            .panel-title{font-size:24px;line-height:26px;color:#fff;}            .ztree li ul li a span{ font-size:20px;}            .ztree li span.button.pIcon01_ico_open, .ztree li span.button.pIcon01_ico_close{width:20px;height:20px;margin-right:2px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/14.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}        .ztree li span.button.pIcon02_ico_open, .ztree li span.button.pIcon02_ico_close{width:20px;height:20px;margin-right:2px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/13.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}        .ztree li span.button.pIcon03_ico_open, .ztree li span.button.pIcon03_ico_close{width:20px;height:20px;margin-right:2px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/15.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}        .ztree li span.button.pIcon04_ico_open, .ztree li span.button.pIcon04_ico_close{width:20px;height:20px;margin-right:2px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/16.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}        .ztree li span.button.pIcon05_ico_open, .ztree li span.button.pIcon05_ico_close{width:20px;height:20px;margin-right:2px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/11.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}        .ztree li span.button.icon02_ico_open, .ztree li span.button.icon02_ico_close{width:20px;height:20px;margin-right:2px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/18.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}        .ztree li span.button.Icon01_ico_docu{width:20px;height:20px;margin-right:2px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/10.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}        .ztree li span.button.icon03_ico_docu,.ztree li span.button.icon02_ico_docu{width:20px;height:20px;margin-right:2px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/17.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}       .ztree li span.button.icon03_ico_open,.ztree li span.button.icon03_ico_close{width:20px;height:20px;margin-right:2px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/maps.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}       .ztree li span.button.icon4_ico_docu{width:20px;height:20px;margin-right:2px; background: url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/maps.png) no-repeat scroll center center transparent; vertical-align:middle; *vertical-align:middle}              }        .ztree li a{vertical-align:middle;}        .ztree li ul li{border:none;}        .west-header{height:32px;line-height:32px;background:#fff;color:#54B6FF;padding-left:45px;font-size:20px;font-weight:600; border-bottom:1px solid #ccc; font-family:"微软雅黑";}        a#ChooseBtn{                    cursor:pointer;                    background:url(../../App_Themes/Default/custom/images/fullscreen.png) no-repeat center center;                    position:fixed;                    right:24px;                    display:block;                    height:30px;                    width:24px;                    color:white;                    font-family:'微软雅黑';                    /* opacity: 0.75;  filter: alpha(opacity=75);*/;}       a#ChooseBtn:hover{  opacity: .8;}                                   </style>    <script type="text/javascript" src="../../Scripts/jquery-1.4.1.min.js"></script>    <script type="text/javascript" src="../../Scripts/jquery.easyui.min.js"></script>    <!--<script type="text/javascript" src="../../Scripts/easyui-lang-zh_CN.js"></script>-->    <script type="text/javascript" src="../../Scripts/jquery.ztree.core-3.5.js"></script>    <script type="text/javascript">        function title() {//            $.ajax({                type: "POST",                dataType: "json",                url: "/UserRole/GetSecuritySituationForHomePage",                data: "AreaID=" + Index.getCookie("AreaID"),                error: function (msg) { },                success: function (msg) {                    //alert( msg.AreaName);                    var AreaName = msg.AreaName;                    var cookieLogo = $("#cookieLogo");                    //alert(AreaName);                    $("#title").html(AreaName + "移动智慧安防平台");                    cookieLogo.text(AreaName + "移动智慧安防平台");                }            });        }        var test = 1;        var Index = {};        Index.getCookie = function (name) {//获得cookie             var bikky = document.cookie;            name += "=";            var i = 0;            //如果cookie 不为空则 循环截取出 相应 名称 的cookie值              while (i < bikky.length) {                var offset = i + name.length;                if (bikky.substring(i, offset) == name) {                    var endstr = bikky.indexOf(";", offset);                    if (endstr == -1) endstr = bikky.length;                    return unescape(bikky.substring(offset, endstr));                }                i = bikky.indexOf(" ", i) + 1;                if (i == 0) break;            }            return null;        }        Index.AObject = function (e, treeId, treeNode) {            var ObjOCX = window.frames['mainIframe'];            try {                ObjOCX.StopAllPlay(); //停止所有窗口实时预览                ObjOCX.g_ObjOCX.StopPatrolRealPlay(); //停止轮巡            } catch (e) { }            try {                ObjOCX.stopLXyls(); //停止建立关联页面视频            } catch (e) { }            try {                ObjOCX.Video.stopLXyls(); //停止告警视频            } catch (e) { }        }        $(function () {            title();            $.ajax({                type: "POST",                dataType: "json",                url: "/Main/../Main/GetUserCookie",                data: "",                error: function (msg) { },                success: function (msg) {                    $("#admin").html(msg.Message);                }            });            myTime();            $('body').layout();            $('body').css('visibility', 'visible');            //$('body').layout('collapsed', 'false');            var indexMeun_setting = {                view: {                    showLine: false,                    selectedMulti: false,                    dblClickExpand: false                },                data: { simpleData: { enable: true} },                callback: { onClick: Index.AObject }            };            $("#addIndex").show();            $.ajax({                type: "POST",                dataType: "json",                async: true,                url: "/UserRole/GetMenuList2",                data: "RoleID=" + Index.getCookie("RoleID"),                error: function (msg) { alert("加载菜单失败!"); },                success: function (msg) {                    $.fn.zTree.init($("#index_Meun"), indexMeun_setting, Index.toZtree(msg.rows)); //加载菜单                    var data = msg.rows;                    $(data).each(function (k, v) {                        //alert("v.Icon:" + v.Icon + "v.MenuName" + v.MenuName);                    });                    $("#addIndex").hide();                    $(".ztree li").mousemove(function () {                        //$(this).children("ul").children("li").children("a:first-child").css("background", "url(../Content/ZtreeStyle/css/zTreeStyle/img/diy/cur17.png)");                        $(this).css("background-color", "#2ba2fc");                        $(this).children("a:first").css({ "background-color": "#2ba2fc", "color": "#fff" });                        $(".ztree li ul").css("background-color", "#fff");                        $(this).children(".noline_close").css("background-position", "0 -18px");                    }).mouseleave(function () {                        $(this).css("background-color", "#fff");                        $(this).children("a:first").css({ "background-color": "#fff", "color": "black" });                        $(this).children(".noline_close.level0").css({                            "background-position": "-18px -18px"                        })                    });                    $(".ztree li a").click(function () {                        if ($(this).prev().hasClass("noline_close") == true) {                            $(this).prev().removeClass("noline_close").addClass("noline_open");                        } else {                            $(this).prev().removeClass("noline_open").addClass("noline_close");                        }                        $(this).prev().trigger('click');                    });                }            });            //阻止浏览器的默认行为             function stopDefault(e) {                //alert(123);                //阻止默认浏览器动作(W3C)                 if (e && e.preventDefault)                    e.preventDefault();                //IE中阻止函数器默认动作的方式                 else window.event.returnValue = false;                return false;            }        });        Index.toZtree = function (Json) {            var ZtreeJson = [];            var nub = -1;            var test;            $(Json).each(function (k, v) {                if (v.IsShow) {                    nub++;                    ZtreeJson[nub] = { "id": v.ID, "pId": v.ParentID, "name": v.MenuName, "url": v.ViewLink.url, "target": "myIframe", "iconSkin": v.Icon };                }            })            return ZtreeJson;        }        function withdraw(URL) {            $.ajax({                type: "POST",                dataType: "json",                url: "/Main/OutIndex",                data: "",                error: function (msg) { },                success: function (msg) {                    window.location.href = URL;                }            });        }        function myTime() {            var mydate = new Date();            var myday = mydate.getDay();            switch (myday) {                case 0: myday = "星期天";                    break;                case 1: myday = "星期一";                    break;                case 2: myday = "星期二";                    break;                case 3: myday = "星期三";                    break;                case 4: myday = "星期四";                    break;                case 5: myday = "星期五";                    break;                case 6: myday = "星期六";                    break;            } // scrolling="no"            //            $("#admin").next().html(mydate.getFullYear() + "年" + (mydate.getMonth() + 1) + "月" + mydate.getDate() + "日" + myday);        }        var ChooseBtnStatu = true;        function changeWindows() {            var ChooseBtn = document.getElementById('ChooseBtn');            var barLeftParent = window.frames['myIframe'].document.getElementById("bar_left");            if (ChooseBtnStatu == true) {                $("#showNav").hide();                //$("#ChooseBtnText").text("全屏");                ChooseBtn.style.backgroundImage = 'url(../../App_Themes/Default/custom/images/windowMode.png)';                $("#ChooseBtn").attr("title", "退出全屏")                changeBig();                document.getElementById('iframeWidth').style.marginLeft = "0";                //                window.frames['myIframe'].document.getElementById("")                   ChooseBtnStatu = false;            } else {                $("#showNav").show();                // $("#ChooseBtnText").text("窗口");                ChooseBtn.style.backgroundImage = 'url(../../App_Themes/Default/custom/images/fullscreen.png)';                $("#ChooseBtn").attr("title", "点击全屏")                reset();                //                if (barLeftParent) {                //                    barLeftParent.style.marginBottom = "26px";                //                }                document.getElementById('iframeWidth').style.marginLeft = "5px";                ChooseBtnStatu = true;            }            barLeftParent = null;        }        var windowWidth = $(window).width();        var windowHeight = $(window).height();        var northHeight = windowHeight * 0.0939;        var westWidth = windowWidth * 0.125;        var westHeight = windowWidth - 75;        //全屏后改变的高宽        function changeBig() {            $(".layout-panel-west").css("width", "0");            $(".layout-panel-north").css({ "height": "0", "min-height": "0" });            $(".layout-panel-center").css({                "width": windowWidth,                "height": windowHeight,                "left": "0",                "top": "0",                "margin-top": 0            });            $(".transparent").css({                "width": windowWidth,                "height": windowHeight            });            //            top.frames['myIframe'].location.reload();        }        function changeBig2() {            //alert("changeBig2");            $("#west").removeClass("westMarginLeft");            $(".layout-panel-center").css({                "width": windowWidth,                "height": windowHeight,                "left": "0"            });            $(".layout-panel-center  .transparent").css({                "width": windowWidth,                "height": windowHeight            });            //             top.frames['myIframe'].location.reload();            //             document.getElementById('mainIframe').contentWindow.location.reload();            //             window.document.getElementByIdx_x("mainIframe").location.reload();            //             document.frames['myIframe'].location.reload();        }        //        document.getElementByIdx_x = function (id) {        //            return document.getElementById(id);        //        }        //恢复后的高宽         function reset() {            $("#west").removeClass("westMarginLeft");            $(".layout-panel-north").css({ "height": northHeight, "min-height": "75px" });            $(".layout-panel-center").css({                "width": windowWidth - $("#west").width(),                "height": windowHeight - northHeight + 13,                "min-height": windowHeight - $(".layout-panel-north").height() + 13,                "left": $("#west").width(),                "top": 75            });            $(".layout-panel-center .transparent").css({                "width": windowWidth - $("#west").width(),                "height": windowHeight - northHeight + 13            });            //window.frames['myIframe'].document.getElementById("bar_left").style.marginBottom = "100px";            myIframe.window.location.reload();        }        /*        function resetHome() {        $(".layout-panel-west").css("width", westWidth);        $(".layout-panel-center").css({        "width": windowWidth - westWidth,        "height": windowHeight - northHeight,        "min-height": windowHeight - $(".layout-panel-north").height(),        "left": $(".layout-panel-west").width(),        "top": $(".layout-panel-north").height()        });        $(".layout-panel-center .transparent").css({        "width": windowWidth - westWidth,  //宽        "height": windowHeight - northHeight  //高        })        }        */        function resetHome() {            document.getElementById("indexNorth").style.display = 'block';            // window.frames['myIframe'].document.getElementById("bar_left").style.marginBottom = "";            $("#west").removeClass("westMarginLeft");            $("#west").css({ "height": windowHeight - 75 });            //$("#west").css("height", westHeight);            if (windowWidth <= 2400) {                $(".layout-panel-center").css({                    "width": windowWidth - $("#west").width(),                    "height": windowHeight - 75,                    "left": $("#west").width(),                    "marign-top": 75                });                $(".layout-panel-center .transparent").css({                    "width": windowWidth - westWidth,  //宽                    "height": windowHeight - 60  //高                });            } else {                $(".layout-panel-center").css({                    "width": 2555,                    "height": windowHeight - 75,                    "left": $("#west").width(),                    "marign-top": 75                });                $(".layout-panel-center .transparent").css({                    "width": 2555,  //宽                    "height": windowHeight - 60  //高                });            }        }        function toindex() {            var indexNorth = document.getElementById("indexNorth");            indexNorth.style.display = "none";            document.getElementById('iframeWidth').style.marginLeft = "0";        }        //改变窗口        var resizeTimer = null;        window.onresize = function () {            resizeTimer = resizeTimer ? null : setTimeout(doResize, 0);        }        function doResize() {            //            var iframeWidth = document.getElementById('iframeWidth');            //            var windowWidth = document.documentElement.clientWidth;            //            iframeWidth.offsetWidth = (windowWidth - 245) + "px";            //            iframeWidth.style.left = 240 + "px";            //            alert(12);        };        var getCookieLogout = getCookie("SelectPlace");        function getCookieLogout() {            //alert(111);            $.ajax({                type: "POST",                dataType: "json",                url: "/UserRole/GetSecuritySituationForHomePage",                data: "AreaID=" + Index.getCookie("AreaID"),                error: function (msg) { },                success: function (msg) {                    //alert( msg.AreaName);                    var AreaName = msg.AreaName;                    getCookieLogout = AreaName;                    //alert(getCookieLogout);                    function setCookie(c_name, value) {                        var Days = 30;                        var exdate = new Date();                        exdate.setTime(exdate.getTime() + Days * 24 * 60 * 60 * 1000);                        document.cookie = c_name + "=" + getCookieLogout + ";expires=" + exdate.toGMTString() + ";path=/";                        //                        document.cookie = c_name + "=" + escape(value) + ";expires=" + exdate.toGMTString() + ";path=/";                        alert(document.cookie);                    }                    return setCookie();                }            });        }        window.onload = function () {            function getCookie(c_name) {                if (document.cookie.length > 0) {                    var c_start = document.cookie.indexOf(c_name + "=");                    if (c_start != -1) {                        c_start = c_start + c_name.length + 1;                        c_end = document.cookie.indexOf(";", c_start);                        if (c_end == -1) {                            c_end = document.cookie.length;                        }                        return unescape(document.cookie.substring(c_start, c_end));                    }                }            }//            var cookieLogo = $("#cookieLogo");//            switch (logo_customBG) {//                case "0"://                    cookieLogo.text("广东移动智慧安防平台")//                    break;//                case "1"://                    cookieLogo.text("广州移动智慧安防平台")//                    break;//                case "2"://                    cookieLogo.text("深圳移动智慧安防平台")//                    break;//                case "3"://                    cookieLogo.text("珠海移动智慧安防平台")//                    break;//                case "4"://                    cookieLogo.text("汕头移动智慧安防平台")//                    break;//                case "5"://                    cookieLogo.text("佛山移动智慧安防平台")//                    break;//                case "6"://                    cookieLogo.text("江门移动智慧安防平台")//                    break;//                case "7"://                    cookieLogo.text("湛江移动智慧安防平台")//                    break;//                case "8"://                    cookieLogo.text("茂名移动智慧安防平台")//                    break;//                case "9"://                    cookieLogo.text("肇庆移动智慧安防平台")//                    break;//                case "10"://                    cookieLogo.text("惠州移动智慧安防平台")//                    break;//                case "11"://                    cookieLogo.text("梅州移动智慧安防平台")//                    break;//                case "12"://                    cookieLogo.text("汕尾移动智慧安防平台")//                    break;//                case "13"://                    cookieLogo.text("河源移动智慧安防平台")//                    break;//                case "14"://                    cookieLogo.text("阳江移动智慧安防平台")//                    break;//                case "15"://                    cookieLogo.text("清远移动智慧安防平台")//                    break;//                case "16"://                    cookieLogo.text("东莞移动智慧安防平台")//                    break;//                case "17"://                    cookieLogo.text("中山移动智慧安防平台")//                    break;//                case "18"://                    cookieLogo.text("潮州移动智慧安防平台")//                    break;//                case "19"://                    cookieLogo.text("揭阳移动智慧安防平台")//                    break;//                case "20"://                    cookieLogo.text("云浮移动智慧安防平台")//                    break;//            }        }    </script></head><body>    <div region="north" border="false" id="north" class="transparent" style="height:75px;">            <div class="logo-custom" id="logo_custom">                <%= System.Configuration.ConfigurationManager.AppSettings["WebSiteName"] %></div><span id="cookieLogo" style=" font-size:40px;color:#fff; font-family:'微软雅黑'; display:inline-block; margin-top:9px;margin-left:20px;"></span>                <div class="info-custom">                      <a  href="/Main/HomePage" target="myIframe" onclick="toindex();"  id="toindex"><i></i><span>首页</span></a>                      <a href="/Main/Logout" id="outindex" onclick=" getCookieLogout()"><i></i><span>退出</span></a>                 </div>            <div>        </div>    </div>   <%--  headercls="my-west-header"--%>    <div class="westMarginLeft" style="width:240px;margin-top:75px; overflow: auto; height:100%;" id="west" border="false" iconcls="iwestHcon-">        <div class="west-header">系统菜单</div>        <div id="index_Meun" class="ztree" fit="true" border="false">            <div id="addIndex" style="display:none; overflow:auto;"><img src="../../Content/jquery-easyui-1.4/themes/default/images/loading.gif" />正在加载菜单</div>        </div>    </div>    <div id="iframeWidth" region="center" class="transparent" border="false"> <%--style="overflow:hidden;"--%>    <div id="indexNorth"  style="height:32px;background:#fff;display:none; border-bottom:1px solid #ccc;">        <span id="showNav" onclick="resetHome();" title="点击展开菜单" style="float:left;margin:4px;cursor:pointer;height:24px;width:24px;color:white;background:url(../../App_Themes/Default/custom/images/showNav.png) no-repeat;"></span>        <a id="ChooseBtn"  onclick="changeWindows()" title="点击全屏"></a>        <span id="ChooseBtnText"  style="display:none;" >窗口</span>    </div>        <iframe name="myIframe" id="mainIframe" class="myIframe" frameborder="0" src="/Main/HomePage" style="background-color: transparent;" allowTransparency="true">        </iframe>    </div>    <%--<iframe scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="width:58px;height: 30px; position: absolute;right:3%; top:24px;background: #0C4169;filter='Alpha(style=0,opacity=0)'; z-index:9999;" src=""></iframe>--%></body></html>
原创粉丝点击