.NET 學習

.NET 學習生活感想... 万事成蹉跎..... 贵在坚持 及时整理自己做过和学过的东西

博客园 首页 新随笔 联系 订阅 管理


//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).

posted on 2007-04-27 13:45  Tonyyang  阅读(494)  评论(0编辑  收藏  举报
欢迎转载,转载请注明出处:http://www.cnblogs.com/Tonyyang/