//String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g, "");}; /** * 分页查询 * 提交表单 * @param fileHtmlCallback 填充返回html的回调函数,调用时传入获取的html内容作为参数,为空时则按默认方式填充。 */ function queryPagelist(form,flag,fileHtmlCallback,showid){ if(!_valForm(form)){ return false; } if(!flag){ setPageParamter(form,1,0);//设置为从第一页开始查询 } loadingAlert("数据加载中,请稍候...");//弹出载信息 var els=form.elements; var param=new Object(); for(var i=0;i-1) { trcount += 1; tpdata = tpdata.substring(trindex+3); } var trcon = trcount==2?'



':trcount==3?'

':trcount==4?'
':''; if(showid){ $("#"+showid).html(data + trcon); }else{ $("#listData").html(data + trcon); } ReSizeiFrame(window.top.document.getElementById("containerPage")); try{ tbhover("tb"); }catch(e){} } }.bind(this), error:function (xmlHttpRequest, error) { msgAlert("系统繁忙,请稍后再试!"); } }); return false; } /*页面转向 * *curPage 当前页码 *pageCount 总页数 *dataCount 总行数 * */ function toQueryPagelist(url,curPage,pageCount,dataCount){ if(curPage>pageCount){ return; } if(curPage<1){ curPage=1; } if(url&&url.length>5){ window.location.href=url; return; } this._queryPageForm||(this._queryPageForm=document.getElementsByTagName("form")[0]); if(this._queryPageForm){ setPageParamter(this._queryPageForm,curPage,dataCount); queryPagelist(this._queryPageForm,true,null,this._showid); } } /** * 设置form参数 */ function setPageParamter(form,curPage,dataCount){ var curPageObj=form.curPage; if(curPageObj){ curPageObj.value=curPage; }else{ curPageObj=document.createElement("input"); curPageObj.setAttribute("type","hidden"); curPageObj.setAttribute("name","curPage"); curPageObj.setAttribute("value",curPage); form.appendChild(curPageObj); } var dataCountObj=form.dataCount; if(dataCountObj){ dataCountObj.value=dataCount; }else{ dataCountObj=document.createElement("input"); dataCountObj.setAttribute("type","hidden"); dataCountObj.setAttribute("name","dataCount"); dataCountObj.setAttribute("value",dataCount); form.appendChild(dataCountObj); } }