第一種:
jqGrid隨視窗大小變化自適應寬度
複製程式碼 程式碼如下: $(window).resize(function(){
});
});
第二種:
var ss = pageSize();
🎜> var ss = pageSize();
$("#list"). setGridWidth', ss.WinW-10).jqGrid('setGridHeight', ss.WinH-200);
}
function pageSize() {
(window.innerHeight) {// all except IE
winW = window.innerWidth;
winH = window.innerHeight;
} else if (document.client/document. 6 Strict Mode
winW = document.documentElement.clientWidth;
winH = document.documentElement.clientHeight;
} else if (document.body) {W. ;
winH = document.body.clientHeight;
} // for small pages with total size less then the viewport
return {WinW:winW, WinH:winH}; 🎜>