亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

jqGrid隨窗口大小變化自適應大小的示例代碼

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

第一種:

jqGrid隨窗口大小變化自適應寬度

復制代碼 代碼如下:

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

第二種:
復制代碼 代碼如下:

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};

相關文章

最新評論