第一种:
第二种:
复制代码 代码如下:
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 exceptie
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};
}







网友评论文明上网理性发言已有0人参与
发表评论: