var className; var className_on; function submitForBigData( _url ,data, callBack){ //var _div = document.getElementById(div); if( _url.indexOf('?')!=-1 ){ _url += '&temp='+Math.random(); }else{ _url += '?temp='+Math.random(); } try{ $.ajax({ url : encodeURI( _url ), type : 'POST', cache : false, data : data, dataType : 'html', success : function(result){ if( typeof( callBack )!='undefined' && callBack.constructor == Function ){ callBack(result); } }, error : function(result){ window.alert( '操作失败' ); } }); }catch(e){ alert(e); } } function setSelectIndex(selObj, val){ if(!selObj || !val || !selObj.length) return; for(i=0;i'+note+''; obj.insertAdjacentHTML('afterEnd',html); } } } function insertNote2(afterWho, note){ var obj = document.getElementById(afterWho); if(obj) obj.focus(); alert(note); } if(!document.all && HTMLElement){ HTMLElement.prototype.insertAdjacentHTML=function(where, html){ var e=this.ownerDocument.createRange(); e.setStartBefore(this); e=e.createContextualFragment(html); switch (where) { case 'beforeBegin': this.parentNode.insertBefore(e, this);break; case 'afterBegin': this.insertBefore(e, this.firstChild); break; case 'beforeEnd': this.appendChild(e); break; case 'afterEnd': if(!this.nextSibling) this.parentNode.appendChild(e); else this.parentNode.insertBefore(e, this.nextSibling); break; } }; }else{ } function alertNote(afterWho, note){ var obj = document.getElementById(afterWho) var keyId = afterWho + "_note" if(obj){ obj.focus(); alert(note); } } function initDefaultValue(iptObj,regObj){ if(!regObj)return; var isAdd = true; if(iptObj.tagName=='INPUT'){ if(iptObj.type=='radio'||iptObj.type=='checkbox'){ isAdd = iptObj.checked; } } if(regObj.tagName=='INPUT'){ if(regObj.type=='text'){ regObj.value = filterValue(regObj.value,iptObj.value,isAdd); } } } function filterValue(value,ipt,isAdd){ // used by common.js: initDefaultValue() if(ipt.length==0)return value; if(value.length==0) return ipt; if(value.length>=ipt.length){ var begin = value.substring(0,ipt.length); if(begin==ipt){ if(isAdd) return value; else return value.substring(ipt.length+1); } } var temp = ','+ipt; var idx = value.indexOf(temp); if(idx==-1){ if(isAdd) value = value + temp; }else{ if(!isAdd) value = value.substring(0,idx) + value.substring(idx+temp.length); } return value; } function setInputNumOnly(objName){ var obj = getElement(objName); if(obj){ obj.style.imeMode='disabled'; obj.onkeydown=function(event){ var kc = document.all?window.event.keyCode:event.which; if(kc>=96&&kc<=105) kc = kc - 48; if(kc==37||kc==39||kc==9||kc==46){ return true; } if(kc==8||kc==32||(kc>=48&&kc<=57)) return true; else return false; } } } function setHighLightEvent(obj){ if(!obj)return; if(obj.length){ for(i=0;i