欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jqGrid隨窗口大小變化自適應(yīng)大小的示例代碼

 更新時(shí)間:2013年12月28日 09:36:28   作者:  
本篇文章主要是對(duì)jqGrid隨窗口大小變化自適應(yīng)大小的示例代碼進(jìn)行了詳細(xì)的介紹,需要的朋友可以過來參考下,希望對(duì)大家有所幫助

第一種:

jqGrid隨窗口大小變化自適應(yīng)寬度

復(fù)制代碼 代碼如下:

$(function(){
            $(window).resize(function(){  
         $("#listId").setGridWidth($(window).width());
        });
       });

第二種:
復(fù)制代碼 代碼如下:

window.onresize = function  _doResize() {
 var ss = pageSize();
 $("#listId").jqGrid('setGridWidth', ss.WinW-10).jqGrid('setGridHeight', ss.WinH-200);
   }

 function pageSize() {
   var winW, winH;
  if(window.innerHeight) {// all except IE
   winW = window.innerWidth;
   winH = window.innerHeight;
  } else if (document.documentElement && document.documentElement.clientHeight) {// IE 6 Strict Mode
   winW = document.documentElement.clientWidth;
   winH = document.documentElement.clientHeight;
  } else if (document.body) { // other
   winW = document.body.clientWidth;
   winH = document.body.clientHeight;
  }  // for small pages with total size less then the viewport
  return {WinW:winW, WinH:winH};

相關(guān)文章

最新評(píng)論