function $(id){ return document.getElementById(id); } //根据不通用屏幕分辨率设定Grid高度 LWP 2012-10-13 function initDialog(){ var winScreenHeight = 0; var winScreenWidth = 0; if(window.screen.height){ winScreenHeight = window.screen.height; } if(window.screen.width){ winScreenWidth = window.screen.width; } if(winScreenWidth >= 1440 && winScreenWidth >= 900){ document.getElementById("mygrid").style.height = "420px"; }else if(winScreenWidth >= 1366 && winScreenWidth >= 768){ document.getElementById("mygrid").style.height = "340px"; }else if(winScreenWidth >= 1024 && winScreenWidth >= 768){ document.getElementById("mygrid").style.height = "300px"; } } function newGuid() { var guid = ""; for (var i = 1; i <= 32; i++){ var n = Math.floor(Math.random()*16.0).toString(16); guid += n; if((i==8)||(i==12)||(i==16)||(i==20)) guid += "-"; } return guid.toUpperCase(); } //转换函数(将数组转为字符串) LWP 2012-10-13 function dotransition(paraobj) { var tem_str = ""; for(var i=0;i self.pageCount){ self.index = self.pageCount; } }; /** * 渲染分页控件. */ this.render = function(){ if(self.id != undefined){ var div = document.getElementById(self.id); div.view = self; self.container = div; } self.calculate(); var start, end; start = Math.max(1, self.index - parseInt(self.maxButtons/2)); end = Math.min(self.pageCount, start + self.maxButtons - 1); start = Math.max(1, end - self.maxButtons + 1); var str = ""; str += "
\n"; if(self.pageCount > 1){ if(self.index != 1){ str += '|<'; str += '<<'; }else{ str += '|<'; str += '<<'; } } for(var i=start; i<=end; i++){ if(i == this.index){ str += '' + i + ""; }else{ str += '' + i + ""; } } if(self.pageCount > 1){ if(self.index != self.pageCount){ str += '>>'; str += '>|'; }else{ str += '>>'; str += '>|'; } } str += ' 一共' + self.pageCount + '页, ' + self.itemCount + '条记录 '+'   每页显示: '+""; str += "
\n"; self.container.innerHTML = str; var a_list = self.container.getElementsByTagName('a'); for(var i=0; i"+pageCountArg[i]+""; }else{ optionStr += ""; } } return optionStr; ; }