zoukankan      html  css  js  c++  java
  • DotNetNuke(DNN) 4.5 中的宽中小屏极其大中小字体的实现代码


    //Min: sizeLayout('771')
    //middle:  sizeLayout('994')
    //Max :  sizeLayout('100%')

    <script language="JavaScript">
    <!--


    function setSkinCookie(name, value, expires, path, domain, secure) {
      var curCookie = name + "=" + escape(value) +
          ((expires) ? "; expires=" + expires.toGMTString() : "") +
          ((path) ? "; path=" + path : "") +
          ((domain) ? "; domain=" + domain : "") +
          ((secure) ? "; secure" : "");
       document.cookie = curCookie;
      
       document.getElementById('bbh_table1').width = value;
      
    }
    //Min: sizeLayout('771')
    //middle:  sizeLayout('994')
    //Max :  sizeLayout('100%')
    function sizeLayout(size)
    {
        setSkinCookie("meinkekswert",size, new Date("December 31, 2010 23:59:59"),"/");
        //location.reload();
       
    }

     
      function readCookie(name) {
        var cookieValue = "";
        var search = name + "=";
        if(document.cookie.length > 0) {
            offset = document.cookie.indexOf(search);
            if(offset != -1) {
                offset += search.length;
                end = document.cookie.indexOf(";", offset);
                if(end == -1) end = document.cookie.length;
                cookieValue = unescape(document.cookie.substring(offset, end))
            }
        }
       
       
        if(!(cookieValue==''))
        {
         //alert(cookieValue);
       
         document.getElementById('bbh_table1').width = cookieValue;
       
        }
       
        //return cookieValue;
    }
     

    readCookie('meinkekswert')

    </script>

    说明: 用表做布局 bbh_table1 用 //Min: sizeLayout('771')
                                                         //middle:  sizeLayout('994')
                                                          //Max :  sizeLayout('100%') 控制

     <script language="Javascript">
    function setSkinCookie(name, value, expires, path, domain, secure) {
      var curCookie = name + "=" + escape(value) +
          ((expires) ? "; expires=" + expires.toGMTString() : "") +
          ((path) ? "; path=" + path : "") +
          ((domain) ? "; domain=" + domain : "") +
          ((secure) ? "; secure" : "");
      document.cookie = curCookie;

    function sizeLayout(size)
    {
        setSkinCookie("DotNetNuke_Skin_Layout_Size",size, new Date("December 31, 2010 23:59:59"),"/");
        location.reload();
    }
    </script>
    说明:  用sizeLayout(size) 控制字体的打小 分别为sizeLayout(0),sizeLayout(1),sizeLayout(2).

  • 相关阅读:
    使用ActivityGroup来切换Activity和Layout
    Fragment
    [Java]LeetCode297. 二叉树的序列化与反序列化 | Serialize and Deserialize Binary Tree
    [Swift]LeetCode298. 二叉树最长连续序列 $ Binary Tree Longest Consecutive Sequence
    [Swift]LeetCode296. 最佳开会地点 $ Best Meeting Point
    [Swift]LeetCode294. 翻转游戏之 II $ Flip Game II
    [Swift]LeetCode293. 翻转游戏 $ Flip Game
    [Swift]LeetCode291. 单词模式 II $ Word Pattern II
    [Postman]发出SOAP请求(18)
    [Postman]生成代码段(17)
  • 原文地址:https://www.cnblogs.com/Tonyyang/p/729676.html
Copyright © 2011-2022 走看看