/************************************************* Description: 全选,反选 @param: obj 对象名 如:document.form @see: 被doOption调用 History: 汪卫安 2007-1-5 曾光 2007-1-11 *************************************************/ function checkAll(obj){ obj = eval(obj); for ( var i=0; i'9' ) { b = true; if ( flag ) { if ( str.substring(i,i+1)!="-" && str.substring(i,i+1)!=" " && str.substring(i,i+1)!=":" && str.substring(i,i+1)!=";" ) break; else b = false; } } } return b; } /************************************************* Description: 判断分页页码是否为数字 @see: 调用isNumber History: 汪卫安 2007-1-5 *************************************************/ function checkCurrpage(){ if ( isNumber(document.pageForm.currpage.value,false) ) { alert("页码必须为数字,请确认!"); document.pageForm.currpage.focus(); return false; } else{ showTip(); return true; } } /************************************************* Description: 某些按钮点击时显示操作提示 @param: str 显示提示内容 @see: 被doSubmit调用 History: 曾光 2007-1-9 *************************************************/ function showTip(str){ // 创建临时层 var tmp_div = document.createElement("DIV"); if( tmp_div ){ tmp_div.className = "div_tip"; tmp_div.name = "div_tip"; tmp_div.id = "div_tip"; str = ( str ) ? str : "操作正在进行中,请稍候..."; tmp_div.innerHTML = "系统提示"; tmp_div.innerHTML += ""+ str+"
"; document.body.appendChild(tmp_div); } } /************************************************* Description: 清除操作提示 @see: 无关联函数 History: 曾光 2007-1-9 *************************************************/ function clearTip(){ var tmp_div = document.getElementById("div_tip"); if( tmp_div ) document.body.removeChild(tmp_div); } /************************************************* Description: 页码跳转 @param: 页码 @see: 调用showTip History: 曾光 2007-1-9 *************************************************/ function goPage(num){ num = num * 1; showTip("页面跳转中,请稍候..."); document.pageForm.currpage.value=num; document.pageForm.submit(); } /************************************************* Description: 缩短过长字符 @param: str 原字符 stratt 附加字符(无需缩短) len1 前半部分长度,默认10 len2 后半部分长度,默认10 sep 省略字符,默认“...” @see: 调用dateStr History: 曾光 2007-1-15 *************************************************/ function shortStr(str,stratt,len1,len2,sep){ //初始化 var len1 = len1 ? len1 : 10; var len2 = len2 ? len2 : 10; var sep = sep ? sep : "......"; var id = dateStr(); var slen = str.length; if( slen < len1 + len2 ){ jsWrite( str ); }else{ var str1 = str.substring(0,len1); var str2 = str.substring(slen-len2,slen); document.write("
" + str1 + sep + str2 +"" + stratt+"
"); document.write("