1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/lxchutao-ChkInputs

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
ChkInputs.min.js 41 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
lxchutao Отправлено 21.08.2015 12:11 7e69837
/* Copyright (C) 楚涛 2008-2011 lxchutao@163.com QQ:290363711 http://blog.csdn.net/chutao */
var m_msgType=2,m_MessageId="MessageId",m_AttributeFlag=0,m_TrimFlag=0,m_split="|",m_Alert_Mode=0,m_msgAll="",m_input=null,m_inputNames=[],m_form;function initAllParams(){m_msgAll="";m_input=null;m_inputNames=[]}function verifyAll(a){initAllParams();try{if(m_msgType==1)return verifyAllType1(a);else if(m_msgType==3)return verifyAllType3(a);else return verifyAllType2(a)}catch(b){return CancelClientEvent()}}function loadAllChkInputs(b){var c="focus",d="showmenu";try{for(var e=b.elements.length,a=0;a<e;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;detachEventHandler(b.elements[a],"blur",verifyInputOnblur);attachEventHandler(b.elements[a],"blur",verifyInputOnblur);if(b.elements[a].getAttribute("valuerange",m_AttributeFlag)!=null)if(b.elements[a].getAttribute(d,m_AttributeFlag)=="1"){detachEventHandler(b.elements[a],c,showSelectMenuOnEvent);attachEventHandler(b.elements[a],c,showSelectMenuOnEvent)}else if(b.elements[a].getAttribute(d,m_AttributeFlag)=="2"){detachEventHandler(b.elements[a],c,showDropMenuOnEvent);attachEventHandler(b.elements[a],c,showDropMenuOnEvent);b.elements[a].setAttribute("notcheckvaluerange","true")}}}catch(f){}}window.$$=function(a){return document.getElementById(a)};function attachEventHandler(a,b,c){if(a.addEventListener)a.addEventListener(b,c,false);else if(a.attachEvent)a.attachEvent("on"+b,c);else a["on"+b]=c}function detachEventHandler(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,false);else if(a.detachEvent)a.detachEvent("on"+b,c);else a["on"+sEventType]=null}function verifyAllExceptNullable(a){initAllParams();try{if(m_msgType==1)return verifyAllExceptNullableType1(a);else if(m_msgType==3)return verifyAllExceptNullableType3(a);else return verifyAllExceptNullableType2(a)}catch(b){return CancelClientEvent()}}function verifyAllByGroup(b,a){initAllParams();try{if(m_msgType==1)return verifyAllGroupType1(b,a);else if(m_msgType==3)return verifyAllGroupType3(b,a);else return verifyAllGroupType2(b,a)}catch(c){return CancelClientEvent()}}function verifyAllByGroup1(b,a){initAllParams();try{if(m_msgType==1)return verifyAllGroup1Type1(b,a);else if(m_msgType==3)return verifyAllGroup1Type3(b,a);else return verifyAllGroup1Type2(b,a)}catch(c){return CancelClientEvent()}}function verifyAllByGroup2(b,a){initAllParams();try{if(m_msgType==1)return verifyAllGroup2Type1(b,a);else if(m_msgType==3)return verifyAllGroup2Type3(b,a);else return verifyAllGroup2Type2(b,a)}catch(c){return CancelClientEvent()}}function verifyAllByGroup3(b,a){initAllParams();try{if(m_msgType==1)return verifyAllGroup3Type1(b,a);else if(m_msgType==3)return verifyAllGroup3Type3(b,a);else return verifyAllGroup3Type2(b,a)}catch(c){return CancelClientEvent()}}function verifyAllByGroup4(b,a){initAllParams();try{if(m_msgType==1)return verifyAllGroup4Type1(b,a);else if(m_msgType==3)return verifyAllGroup4Type3(b,a);else return verifyAllGroup4Type2(b,a)}catch(c){return CancelClientEvent()}}function verifyAllByGroup5(b,a){initAllParams();try{if(m_msgType==1)return verifyAllGroup5Type1(b,a);else if(m_msgType==3)return verifyAllGroup5Type3(b,a);else return verifyAllGroup5Type2(b,a)}catch(c){return CancelClientEvent()}}function verifyAllOnblur(b){for(var c=b.elements.length,a=0;a<c;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;detachEventHandler(b.elements[a],"blur",verifyInputOnblur);attachEventHandler(b.elements[a],"blur",verifyInputOnblur)}}function verifyInputOnblur(){var a=arguments[0]||window.event,b=a.srcElement||a.target;checkInputNoFocus(b)}function showAllSelectMenu(b){for(var c=b.elements.length,a=0;a<c;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;if(b.elements[a].getAttribute("valuerange",m_AttributeFlag)!=null&&b.elements[a].getAttribute("showmenu",m_AttributeFlag)=="1"){detachEventHandler(b.elements[a],"focus",showSelectMenuOnEvent);attachEventHandler(b.elements[a],"focus",showSelectMenuOnEvent)}}}function showSelectMenuOnEvent(){var a=arguments[0]||window.event,b=a.srcElement||a.target;showSelectMenu(b)}function showSelectMenu(a){var b="notcheckvaluerange",x="mousedown",w="mouseout",i="mouseover",f=null,v="valuerange",h="px",m=0,n=1,d="chk_new_select_menudiv_1",g=0,l="";$$(d)&&document.body.removeChild($$(d));$$(d)&&document.body.removeChild($$(d));var c=document.createElement("div");c.id=d;c.className="chk_menuclass";c.style.position="absolute";c.style.zIndex=9999;c.style.overflow="auto";c.style.width=a.offsetWidth+h;c.style.top=a.offsetHeight+getChkInputTop(a)+h;c.style.left=getChkInputLeft(a)+h;a.getAttribute(v,m_AttributeFlag);var j=a.getAttribute(v,m_AttributeFlag).split(m_split);if(j.length>25)c.style.height=500+h;for(var k=0;k<j.length;k++){var e=document.createElement("div");e.innerHTML=j[k];if(a.value!=f&&a.value!=""&&a.value==j[k])e.style.fontWeight="bold";else e.style.fontWeight="";detachEventHandler(e,i,p);detachEventHandler(e,w,q);detachEventHandler(e,x,r);attachEventHandler(e,i,p);attachEventHandler(e,w,q);attachEventHandler(e,x,r);c.appendChild(e)}detachEventHandler(c,i,o);attachEventHandler(c,i,o);document.body.appendChild(c);detachEventHandler(a,"focus",s);detachEventHandler(a,"blur",u);detachEventHandler(a,"keyup",t);attachEventHandler(a,"focus",s);attachEventHandler(a,"blur",u);attachEventHandler(a,"keyup",t);function p(){var c=arguments[0]||window.event,d=c.srcElement||c.target;d.className="chk_menuclass_mouseover";if(a.getAttribute(b,m_AttributeFlag)!=f){g=1;l=a.getAttribute(b,m_AttributeFlag)}a.setAttribute(b,"true")}function q(){var c=arguments[0]||window.event,d=c.srcElement||c.target;d.className="chk_menuclass_mouseout";if(g=1){g=0;a.setAttribute(b,l)}else a.removeAttribute(b)}function r(){var c=arguments[0]||window.event,e=c.srcElement||c.target;a.value=e.innerHTML;if(g=1){g=0;a.setAttribute(b,l)}else a.removeAttribute(b);$$(d)&&document.body.removeChild($$(d))}function o(){n=0}function u(){m=1;var a=$$(d);if(a&&n!=0){document.body.removeChild(a);return false}}function s(){m=0}function t(){if($$(d)){var b=$$(d).childNodes;if(b)for(var c=0;c<b.length;c++){var e=b[c].innerHTML.toUpperCase(),g=a.value.toUpperCase();if(a.value!=f&&a.value!=""&&e.indexOf(g)==-1)b[c].style.display="none";else{if(a.value!=f&&a.value!=""&&e.indexOf(g)!=-1)b[c].style.fontWeight="bold";else b[c].style.fontWeight="";b[c].style.display=""}}}}}function showAllDropMenu(b){for(var c=b.elements.length,a=0;a<c;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;if(b.elements[a].getAttribute("valuerange",m_AttributeFlag)!=null&&b.elements[a].getAttribute("showmenu",m_AttributeFlag)=="2"){detachEventHandler(b.elements[a],"focus",showDropMenuOnEvent);attachEventHandler(b.elements[a],"focus",showDropMenuOnEvent);b.elements[a].setAttribute("notcheckvaluerange","true")}}}function showDropMenuOnEvent(){var a=arguments[0]||window.event,b=a.srcElement||a.target;showDropMenu(b)}function showDropMenu(b){var g="mouseout",f="mouseover",r="valuerange",e="px",h=0,i=1,c="chk_new_drop_menudiv_2";$$(c)&&document.body.removeChild($$(c));$$(c)&&document.body.removeChild($$(c));var a=document.createElement("div");a.id=c;a.className="chk_menuclass";a.style.position="absolute";a.style.zIndex=9999;a.style.overflow="auto";a.style.width=b.offsetWidth+e;a.style.top=b.offsetHeight+getChkInputTop(b)+e;a.style.left=getChkInputLeft(b)+e;b.getAttribute(r,m_AttributeFlag);var j=b.getAttribute(r,m_AttributeFlag).split(m_split);if(j.length>25)a.style.height=500+e;for(var k=0;k<j.length;k++){var d=document.createElement("div");d.innerHTML=j[k];detachEventHandler(d,f,n);detachEventHandler(d,g,o);attachEventHandler(d,f,n);attachEventHandler(d,g,o);a.appendChild(d)}detachEventHandler(a,f,l);detachEventHandler(a,g,m);attachEventHandler(a,f,l);attachEventHandler(a,g,m);document.body.appendChild(a);detachEventHandler(b,"focus",p);detachEventHandler(b,"blur",q);attachEventHandler(b,"focus",p);attachEventHandler(b,"blur",q);function n(){var a=arguments[0]||window.event,b=a.srcElement||a.target;b.className="chk_menuclass_mouseover"}function o(){var a=arguments[0]||window.event,b=a.srcElement||a.target;b.className="chk_menuclass_mouseout"}function l(){i=0}function m(){i=1;var a=$$(c);if(a&&h!=0){document.body.removeChild(a);return false}}function q(){h=1;var a=$$(c);if(a&&i!=0){document.body.removeChild(a);return false}}function p(){h=0}}function verifyAllType1(b){for(var c=b.elements.length,a=0;a<c;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(verifyInput(b.elements[a])==false){focusInput(b.elements[a]);CancelClientEvent();return false}}return true}function verifyAllType2(b){for(var c=b.elements.length,a=0;a<c;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(verifyInput(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){chkAlert(m_msgAll);focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllType3(b){for(var c=b.elements.length,a=0;a<c;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(verifyInput(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){showMsgInMessageId();focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllExceptNullableType1(b){for(var c=b.elements.length,a=0;a<c;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(verifyInputExceptNullable(b.elements[a])==false){focusInput(b.elements[a]);CancelClientEvent();return false}}return true}function verifyAllExceptNullableType2(b){for(var c=b.elements.length,a=0;a<c;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(verifyInputExceptNullable(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){chkAlert(m_msgAll);focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllExceptNullableType3(b){for(var c=b.elements.length,a=0;a<c;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(verifyInputExceptNullable(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){showMsgInMessageId();focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllGroupType1(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false){focusInput(b.elements[a]);CancelClientEvent();return false}}return true}function verifyAllGroupType2(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){chkAlert(m_msgAll);focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllGroupType3(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){showMsgInMessageId();focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllGroup1Type1(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group1",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false){focusInput(b.elements[a]);CancelClientEvent();return false}}return true}function verifyAllGroup1Type2(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group1",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){chkAlert(m_msgAll);focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllGroup1Type3(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group1",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){showMsgInMessageId();focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllGroup2Type1(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group2",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false){focusInput(b.elements[a]);CancelClientEvent();return false}}return true}function verifyAllGroup2Type2(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group2",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){chkAlert(m_msgAll);focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllGroup2Type3(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group2",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){showMsgInMessageId();focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllGroup3Type1(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group3",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false){focusInput(b.elements[a]);CancelClientEvent();return false}}return true}function verifyAllGroup3Type2(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group3",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){chkAlert(m_msgAll);focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllGroup3Type3(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group3",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){showMsgInMessageId();focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllGroup4Type1(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group4",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false){focusInput(b.elements[a]);CancelClientEvent();return false}}return true}function verifyAllGroup4Type2(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group4",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){chkAlert(m_msgAll);focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllGroup4Type3(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group4",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){showMsgInMessageId();focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllGroup5Type1(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group5",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false){focusInput(b.elements[a]);CancelClientEvent();return false}}return true}function verifyAllGroup5Type2(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group5",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){chkAlert(m_msgAll);focusInput(m_input);CancelClientEvent();return false}return true}function verifyAllGroup5Type3(b,c){for(var d=b.elements.length,a=0;a<d;a++){if(b.elements[a].getAttribute("chinese",m_AttributeFlag)==null)continue;clearNotMatchInputClass(b.elements[a]);if(b.elements[a].getAttribute("group5",m_AttributeFlag)==c)if(verifyInput(b.elements[a])==false&&m_input==null)m_input=b.elements[a]}if(m_input!=null){showMsgInMessageId();focusInput(m_input);CancelClientEvent();return false}return true}function verifyInput(input){var m="notmatchinfo",l="\u503c\u5e94\u8be5\u4e3a\u6574\u6570\n",k="\u5185\u5bb9\u592a\u77ed,\u81f3\u5c11\u987b ",j="minsize",i=" \u4e2a\u6c49\u5b57\u7684\u957f\u5ea6\n",h=" \u4e2a\u82f1\u6587\u5b57\u7b26\u7684\u957f\u5ea6\u6216 ",g="\u5185\u5bb9\u592a\u957f,\u4e0d\u5e94\u8d85\u8fc7 ",f="maxsize",e="chinese",d="initialvalue",c=false,b="\n",a=null;if(input.type=="checkbox"||input.type=="radio"){var v_msg=verifyInputByName(input.name);if(v_msg!=a&&v_msg!=""){notMatchInputClass(input);m_msgAll+=v_msg+b;m_msgType==1&&chkAlert(v_msg);return c}}else{var v_initialValue="";if(input.getAttribute(d,m_AttributeFlag)!=a)v_initialValue=input.getAttribute(d,m_AttributeFlag);if(input.getAttribute("nullable",m_AttributeFlag)=="no"&&(!isNull(checkTrim(input.value))||checkTrim(input.value)==v_initialValue)){notMatchInputClass(input);m_msgAll+=input.getAttribute(e,m_AttributeFlag)+"\u4e0d\u80fd\u4e3a\u7a7a\n";m_msgType==1&&chkAlert(input.getAttribute(e,m_AttributeFlag)+"\u4e0d\u80fd\u4e3a\u7a7a");return c}if(input.getAttribute(f,m_AttributeFlag)!=a&&strlen(checkTrim(input.value))>parseInt(input.getAttribute(f,m_AttributeFlag))){notMatchInputClass(input);m_msgAll+=input.getAttribute(e,m_AttributeFlag)+g+input.getAttribute(f,m_AttributeFlag)+h+parseInt(input.getAttribute(f,m_AttributeFlag))/2+i;m_msgType==1&&chkAlert(input.getAttribute(e,m_AttributeFlag)+g+input.getAttribute(f,m_AttributeFlag)+h+parseInt(input.getAttribute(f,m_AttributeFlag))/2+" \u4e2a\u6c49\u5b57\u7684\u957f\u5ea6");return c}if(input.getAttribute(j,m_AttributeFlag)!=a&&!(!isNull(checkTrim(input.value))||checkTrim(input.value)==v_initialValue)&&strlen(checkTrim(input.value))<parseInt(input.getAttribute(j,m_AttributeFlag))){notMatchInputClass(input);m_msgAll+=input.getAttribute(e,m_AttributeFlag)+k+input.getAttribute(j,m_AttributeFlag)+h+parseInt(input.getAttribute(j,m_AttributeFlag))/2+i;m_msgType==1&&chkAlert(input.getAttribute(e,m_AttributeFlag)+k+input.getAttribute(j,m_AttributeFlag)+h+parseInt(input.getAttribute(j,m_AttributeFlag))/2+" \u4e2a\u6c49\u5b57\u7684\u957f\u5ea6");return c}if(isNull(checkTrim(input.value))&&checkTrim(input.value)!=v_initialValue){switch(input.getAttribute("datatype",m_AttributeFlag)){case "number":if(isNumber(checkTrim(input.value))==c){notMatchInputClass(input);m_msgAll+=input.getAttribute(e,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5168\u4e3a\u6574\u6570\u6570\u5b57\n";m_msgType==1&&chkAlert(input.getAttribute(e,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5168\u4e3a\u6574\u6570\u6570\u5b57");return c}else{var v_rangeMsg=verifyInputMaxMinValue(input);if(v_rangeMsg!=""){notMatchInputClass(input);m_msgAll+=v_rangeMsg+b;m_msgType==1&&chkAlert(v_rangeMsg);return c}}break;case "int":if(isInt(checkTrim(input.value))==c){notMatchInputClass(input);m_msgAll+=input.getAttribute(e,m_AttributeFlag)+l;m_msgType==1&&chkAlert(input.getAttribute(e,m_AttributeFlag)+"\u503c\u5e94\u8be5\u4e3a\u6574\u6570");return c}else{var v_rangeMsg=verifyInputMaxMinValue(input);if(v_rangeMsg!=""){notMatchInputClass(input);m_msgAll+=v_rangeMsg+b;m_msgType==1&&chkAlert(v_rangeMsg);return c}}break;case "integer":if(isInt(checkTrim(input.value))==c){notMatchInputClass(input);m_msgAll+=input.getAttribute(e,m_AttributeFlag)+l;m_msgType==1&&chkAlert(input.getAttribute(e,m_AttributeFlag)+"\u503c\u5e94\u8be5\u4e3a\u6574\u6570");return c}else{var v_rangeMsg=verifyInputMaxMinValue(input);if(v_rangeMsg!=""){m_msgAll+=v_rangeMsg+b;m_msgType==1&&chkAlert(v_rangeMsg);return c}}break;case "float":if(isFloat(checkTrim(input.value))==c){notMatchInputClass(input);m_msgAll+=input.getAttribute(e,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5168\u4e3a\u6570\u5b57\n";m_msgType==1&&chkAlert(input.getAttribute(e,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5168\u4e3a\u6570\u5b57");return c}else{var v_rangeMsg=verifyInputMaxMinValue(input);if(v_rangeMsg!=""){notMatchInputClass(input);m_msgAll+=v_rangeMsg+b;m_msgType==1&&chkAlert(v_rangeMsg);return c}}break;case "alphanumeric":if(isAlphanumeric(checkTrim(input.value))==c){notMatchInputClass(input);m_msgAll+=input.getAttribute(e,m_AttributeFlag)+"\u503c\u5e94\u8be5\u4e3a\u5408\u6cd5\u7684\u5305\u542b\u5b57\u6bcd\u548c\u6570\u5b57\u7684\u5b57\u7b26\u4e32\n";m_msgType==1&&chkAlert(input.getAttribute(e,m_AttributeFlag)+"\u503c\u5e94\u8be5\u4e3a\u5408\u6cd5\u7684\u5305\u542b\u5b57\u6bcd\u548c\u6570\u5b57\u7684\u5b57\u7b26\u4e32");return c}break;case "idcard":if(isIDCard(checkTrim(input.value))==c){notMatchInputClass(input);m_msgAll+=input.getAttribute(e,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u8eab\u4efd\u8bc1\u53f7\n";m_msgType==1&&chkAlert(input.getAttribute(e,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u8eab\u4efd\u8bc1\u53f7");return c}break;case "date":if(isDate(checkTrim(input.value))==c){notMatchInputClass(input);m_msgAll+=input.getAttribute(e,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65e5\u671f\u683c\u5f0f\n";m_msgType==1&&chkAlert(input.getAttribute(e,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65e5\u671f\u683c\u5f0f");return c}else{var v_temp_msg=verifyInputDateValue(input);if(v_temp_msg!=""){notMatchInputClass(input);m_msgAll+=v_temp_msg+b;m_msgType==1&&chkAlert(v_temp_msg);return c}}break;case "datetime":if(isDateTime(checkTrim(input.value))==c){notMatchInputClass(input);m_msgAll+=input.getAttribute(e,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65e5\u671f\u65f6\u95f4\u683c\u5f0f\n";m_msgType==1&&chkAlert(input.getAttribute(e,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65e5\u671f\u65f6\u95f4\u683c\u5f0f");return c}else{var v_temp_msg=verifyInputDateTimeValue(input);if(v_temp_msg!=""){notMatchInputClass(input);m_msgAll+=v_temp_msg+b;m_msgType==1&&chkAlert(v_temp_msg);return c}}break;case "time":if(isTime(checkTrim(input.value))==c){notMatchInputClass(input);m_msgAll+=input.getAttribute(e,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65f6\u95f4\u683c\u5f0f\n";m_msgType==1&&chkAlert(input.getAttribute(e,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65f6\u95f4\u683c\u5f0f");return c}else{var v_temp_msg=verifyInputTimeValue(input);if(v_temp_msg!=""){notMatchInputClass(input);m_msgAll+=v_temp_msg+b;m_msgType==1&&chkAlert(v_temp_msg);return c}}break;case "regular":var reg=eval("/"+input.getAttribute("regexpression",m_AttributeFlag)+"/");if(!reg.test(checkTrim(input.value))){notMatchInputClass(input);m_msgAll+=input.getAttribute(e,m_AttributeFlag)+input.getAttribute(m,m_AttributeFlag)+b;m_msgType==1&&chkAlert(input.getAttribute(e,m_AttributeFlag)+input.getAttribute(m,m_AttributeFlag));return c}}if(isValueRange(input)==c){notMatchInputClass(input);m_msgAll+=input.getAttribute(e,m_AttributeFlag)+"\u503c\u4e0d\u5728\u5408\u6cd5\u7684\u8303\u56f4\u5185\n";m_msgType==1&&chkAlert(input.getAttribute(e,m_AttributeFlag)+"\u503c\u4e0d\u5728\u5408\u6cd5\u7684\u8303\u56f4\u5185");return c}}}return true}function verifyInputExceptNullable(input){var l="notmatchinfo",k="\u503c\u5e94\u8be5\u4e3a\u6574\u6570\n",j="\n",i="\u5185\u5bb9\u592a\u77ed,\u81f3\u5c11\u987b ",h="minsize",g=false,f=" \u4e2a\u6c49\u5b57\u7684\u957f\u5ea6\n",e=" \u4e2a\u82f1\u6587\u5b57\u7b26\u7684\u957f\u5ea6\u6216 ",d="\u5185\u5bb9\u592a\u957f,\u4e0d\u5e94\u8d85\u8fc7 ",c="chinese",b="maxsize",a="initialvalue",v_initialValue="";if(input.getAttribute(a,m_AttributeFlag)!=null)v_initialValue=input.getAttribute(a,m_AttributeFlag);if(input.getAttribute(b,m_AttributeFlag)!=null&&strlen(checkTrim(input.value))>parseInt(input.getAttribute(b,m_AttributeFlag))){notMatchInputClass(input);m_msgAll+=input.getAttribute(c,m_AttributeFlag)+d+input.getAttribute(b,m_AttributeFlag)+e+parseInt(input.getAttribute(b,m_AttributeFlag))/2+f;m_msgType==1&&chkAlert(input.getAttribute(c,m_AttributeFlag)+d+input.getAttribute(b,m_AttributeFlag)+e+parseInt(input.getAttribute(b,m_AttributeFlag))/2+" \u4e2a\u6c49\u5b57\u7684\u957f\u5ea6");return g}if(input.getAttribute(h,m_AttributeFlag)!=null&&!(!isNull(checkTrim(input.value))||checkTrim(input.value)==v_initialValue)&&strlen(checkTrim(input.value))<parseInt(input.getAttribute(h,m_AttributeFlag))){notMatchInputClass(input);m_msgAll+=input.getAttribute(c,m_AttributeFlag)+i+input.getAttribute(h,m_AttributeFlag)+e+parseInt(input.getAttribute(h,m_AttributeFlag))/2+f;m_msgType==1&&chkAlert(input.getAttribute(c,m_AttributeFlag)+i+input.getAttribute(h,m_AttributeFlag)+e+parseInt(input.getAttribute(h,m_AttributeFlag))/2+" \u4e2a\u6c49\u5b57\u7684\u957f\u5ea6");return g}if(isNull(checkTrim(input.value))&&checkTrim(input.value)!=v_initialValue){switch(input.getAttribute("datatype",m_AttributeFlag)){case "number":if(isNumber(checkTrim(input.value))==g){notMatchInputClass(input);m_msgAll+=input.getAttribute(c,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5168\u4e3a\u6574\u6570\u6570\u5b57\n";m_msgType==1&&chkAlert(input.getAttribute(c,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5168\u4e3a\u6574\u6570\u6570\u5b57");return g}else{var v_rangeMsg=verifyInputMaxMinValue(input);if(v_rangeMsg!=""){notMatchInputClass(input);m_msgAll+=v_rangeMsg+j;m_msgType==1&&chkAlert(v_rangeMsg);return g}}break;case "int":if(isInt(checkTrim(input.value))==g){notMatchInputClass(input);m_msgAll+=input.getAttribute(c,m_AttributeFlag)+k;m_msgType==1&&chkAlert(input.getAttribute(c,m_AttributeFlag)+"\u503c\u5e94\u8be5\u4e3a\u6574\u6570");return g}else{var v_rangeMsg=verifyInputMaxMinValue(input);if(v_rangeMsg!=""){notMatchInputClass(input);m_msgAll+=v_rangeMsg+j;m_msgType==1&&chkAlert(v_rangeMsg);return g}}break;case "integer":if(isInt(checkTrim(input.value))==g){notMatchInputClass(input);m_msgAll+=input.getAttribute(c,m_AttributeFlag)+k;m_msgType==1&&chkAlert(input.getAttribute(c,m_AttributeFlag)+"\u503c\u5e94\u8be5\u4e3a\u6574\u6570");return g}else{var v_rangeMsg=verifyInputMaxMinValue(input);if(v_rangeMsg!=""){notMatchInputClass(input);m_msgAll+=v_rangeMsg+j;m_msgType==1&&chkAlert(v_rangeMsg);return g}}break;case "float":if(isFloat(checkTrim(input.value))==g){notMatchInputClass(input);m_msgAll+=input.getAttribute(c,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5168\u4e3a\u6570\u5b57\n";m_msgType==1&&chkAlert(input.getAttribute(c,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5168\u4e3a\u6570\u5b57");return g}else{var v_rangeMsg=verifyInputMaxMinValue(input);if(v_rangeMsg!=""){notMatchInputClass(input);m_msgAll+=v_rangeMsg+j;m_msgType==1&&chkAlert(v_rangeMsg);return g}}break;case "alphanumeric":if(isAlphanumeric(checkTrim(input.value))==g){notMatchInputClass(input);m_msgAll+=input.getAttribute(c,m_AttributeFlag)+="\u503c\u5e94\u8be5\u4e3a\u5408\u6cd5\u7684\u5305\u542b\u5b57\u6bcd\u548c\u6570\u5b57\u7684\u5b57\u7b26\u4e32\n";m_msgType==1&&chkAlert(input.getAttribute(c,m_AttributeFlag)+"\u503c\u5e94\u8be5\u4e3a\u5408\u6cd5\u7684\u5305\u542b\u5b57\u6bcd\u548c\u6570\u5b57\u7684\u5b57\u7b26\u4e32");return g}break;case "idcard":if(isIDCard(checkTrim(input.value))==g){notMatchInputClass(input);m_msgAll+=input.getAttribute(c,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u8eab\u4efd\u8bc1\u53f7\n";m_msgType==1&&chkAlert(input.getAttribute(c,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u8eab\u4efd\u8bc1\u53f7");return g}break;case "date":if(isDate(checkTrim(input.value))==g){notMatchInputClass(input);m_msgAll+=input.getAttribute(c,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65e5\u671f\u683c\u5f0f\n";m_msgType==1&&chkAlert(input.getAttribute(c,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65e5\u671f\u683c\u5f0f");return g}else{var v_temp_msg=verifyInputDateValue(input);if(v_temp_msg!=""){notMatchInputClass(input);m_msgAll+=v_temp_msg+j;m_msgType==1&&chkAlert(v_temp_msg);return g}}break;case "datetime":if(isDateTime(checkTrim(input.value))==g){notMatchInputClass(input);m_msgAll+=input.getAttribute(c,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65e5\u671f\u65f6\u95f4\u683c\u5f0f\n";m_msgType==1&&chkAlert(input.getAttribute(c,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65e5\u671f\u65f6\u95f4\u683c\u5f0f");return g}else{var v_temp_msg=verifyInputDateTimeValue(input);if(v_temp_msg!=""){notMatchInputClass(input);m_msgAll+=v_temp_msg+j;m_msgType==1&&chkAlert(v_temp_msg);return g}}break;case "time":if(isTime(checkTrim(input.value))==g){notMatchInputClass(input);m_msgAll+=input.getAttribute(c,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65f6\u95f4\u683c\u5f0f\n";m_msgType==1&&chkAlert(input.getAttribute(c,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65f6\u95f4\u683c\u5f0f");return g}else{var v_temp_msg=verifyInputTimeValue(input);if(v_temp_msg!=""){notMatchInputClass(input);m_msgAll+=v_temp_msg+j;m_msgType==1&&chkAlert(v_temp_msg);return g}}break;case "regular":var reg=eval("/"+input.getAttribute("regexpression",m_AttributeFlag)+"/");if(!reg.test(checkTrim(input.value))){notMatchInputClass(input);m_msgAll+=input.getAttribute(c,m_AttributeFlag)+input.getAttribute(l,m_AttributeFlag)+j;m_msgType==1&&chkAlert(input.getAttribute(c,m_AttributeFlag)+input.getAttribute(l,m_AttributeFlag));return g}}if(isValueRange(input)==g){notMatchInputClass(input);m_msgAll+=input.getAttribute(c,m_AttributeFlag)+"\u503c\u4e0d\u5728\u5408\u6cd5\u7684\u8303\u56f4\u5185\n";m_msgType==1&&chkAlert(input.getAttribute(c,m_AttributeFlag)+"\u503c\u4e0d\u5728\u5408\u6cd5\u7684\u8303\u56f4\u5185");return g}}return true}function verifyInputByName(d){var i="chkminselct",c="chinese",h="checkbox";for(var e="",f=0;f<m_inputNames.length;f++)if(m_inputNames[f]==d)return;var a=document.getElementsByName(d),b=0,g=0;if(a[0].type==h||a[0].type=="radio"){for(b=0;b<a.length;b++)if(a[b].checked)g++;if(a[0].getAttribute(c,m_AttributeFlag)!=null&&a[0].getAttribute("nullable",m_AttributeFlag)=="no")if(g<1)e=a[0].getAttribute(c,m_AttributeFlag)+"\u5fc5\u987b\u9009\u62e9";else if(a[0].type==h)if(g-a[0].getAttribute(i,m_AttributeFlag)<0)e=a[0].getAttribute(c,m_AttributeFlag)+"\u9009\u62e9\u9879\u4e0d\u80fd\u5c11\u4e8e "+a[0].getAttribute(i,m_AttributeFlag)+" \u9879"}m_inputNames.push(d);return e}function getVerifyMsg(){return m_msgAll}function getMsgType(){return m_msgType}function setMsgType(a){m_msgType=a}function jtrim(e){var b=new String(e),a,c,d;if(b==null)b="";for(a=0;a<b.length;a++)if(b.charAt(a)!=" "&&b.charAt(a)!="\t"){c=a;break}for(a=b.length-1;a>=0;a--)if(b.charAt(a)!=" "&&b.charAt(a)!="\t"){d=a;break}var f=e.substring(c,d+1);return f}function checkTrim(a){if(m_TrimFlag==1)return a;else return jtrim(a)}function isInt(c){var a=parseInt(c,10),b=0;if(a>0)b=Math.ceil(c)-a;else b=Math.floor(c)-a;if(Math.abs(a)<new Number(Number.MAX_VALUE)&&b==0)return true;return false}function isFloat(d){var c=false,b,a,e,f;e=c;f=d.length;if(d.length<1)return true;for(b=0;b<d.length;b++){a=d.charAt(b);if(!(a>="0"&&a<="9")&&a!="."&&a!="-"&&a!="+")return c;if((a=="-"||a=="+")&&b>0)return c;if(a==".")switch(b){case 0:return c;break;default:if(b==f-1)return c;if(e)return c;else e=true}}return true}function strlen(c){var b,a;a=0;for(b=0;b<c.length;b++)if(c.charCodeAt(b)>255)a+=2;else a++;return a}function length(a){a=jtrim(a);return strlen(a)}function isNull(a){if(a.length<1)return false;return true}function isNumber(a){if(a.length<1)return true;for(var c="1234567890",b=0;b<a.length;b++)if(c.indexOf(a.charAt(b))==-1)return false;return true}function isAlphanumeric(b){var a=/[a-zA-Z0-9]/;if(a.test(b))return true;else return false}function isIDCard(b){var a=/^\d{17}(x|X)$|^\d{18}$|^\d{15}$/;if(a.test(b))return true;else return false}function isDate(b){var a=/^(\d{1,4})(-|\/|.)(\d{1,2})\2(\d{1,2})$/;if(a.test(b))return true;else return false}function isDateTime(b){var a=/^(\d{1,4})(-|\/|.)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/;if(a.test(b))return true;else return false}function isTime(b){var a=/(\d{1,2}):(\d{1,2}):(\d{1,2})$/;if(a.test(b))return true;else return false}function isValueRange(a){var c="valuerange";if(a.getAttribute(c,m_AttributeFlag)!=null){if(a.getAttribute("notcheckvaluerange",m_AttributeFlag)=="true")return true;for(var d=a.getAttribute(c,m_AttributeFlag).split(m_split),e=checkTrim(a.value),b=0;b<d.length;b++)if(d[b]==e)return true;return false}else return true}function verifyInputMaxMinValue(a){var f="chinese",j="notequalmin",i="notequalmax",g="true",c="minvalue",h=null,b="maxvalue",e="",d=checkTrim(a.value);if(a.getAttribute(b,m_AttributeFlag)!=h&&a.getAttribute(c,m_AttributeFlag)!=h){if((d-a.getAttribute(b,m_AttributeFlag)>=0||d-a.getAttribute(c,m_AttributeFlag)<=0)&&g==a.getAttribute(i,m_AttributeFlag)&&g==a.getAttribute(j,m_AttributeFlag))e=a.getAttribute(f,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5728 ("+a.getAttribute(c,m_AttributeFlag)+","+a.getAttribute(b,m_AttributeFlag)+") \u4e4b\u95f4";else if((d-a.getAttribute(b,m_AttributeFlag)>=0||d-a.getAttribute(c,m_AttributeFlag)<0)&&g==a.getAttribute(i,m_AttributeFlag))e=a.getAttribute(f,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5728 ["+a.getAttribute(c,m_AttributeFlag)+","+a.getAttribute(b,m_AttributeFlag)+") \u4e4b\u95f4";else if((d-a.getAttribute(b,m_AttributeFlag)>0||d-a.getAttribute(c,m_AttributeFlag)<=0)&&g==a.getAttribute(j,m_AttributeFlag))e=a.getAttribute(f,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5728 ("+a.getAttribute(c,m_AttributeFlag)+","+a.getAttribute(b,m_AttributeFlag)+"] \u4e4b\u95f4";else if(d-a.getAttribute(b,m_AttributeFlag)>0||d-a.getAttribute(c,m_AttributeFlag)<0)e=a.getAttribute(f,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5728 ["+a.getAttribute(c,m_AttributeFlag)+","+a.getAttribute(b,m_AttributeFlag)+"] \u4e4b\u95f4"}else if(a.getAttribute(b,m_AttributeFlag)!=h){if(d-a.getAttribute(b,m_AttributeFlag)>=0&&g==a.getAttribute(i,m_AttributeFlag))e=a.getAttribute(f,m_AttributeFlag)+"\u503c\u4e0d\u5e94\u8be5\u5927\u4e8e\u7b49\u4e8e "+a.getAttribute(b,m_AttributeFlag);else if(d-a.getAttribute(b,m_AttributeFlag)>0)e=a.getAttribute(f,m_AttributeFlag)+"\u503c\u4e0d\u5e94\u8be5\u5927\u4e8e "+a.getAttribute(b,m_AttributeFlag)}else if(a.getAttribute(c,m_AttributeFlag)!=h){if(d-a.getAttribute(c,m_AttributeFlag)<=0&&g==a.getAttribute(j,m_AttributeFlag))e=a.getAttribute(f,m_AttributeFlag)+"\u503c\u4e0d\u5e94\u8be5\u5c0f\u4e8e\u7b49\u4e8e "+a.getAttribute(c,m_AttributeFlag);else if(d-a.getAttribute(c,m_AttributeFlag)<0)e=a.getAttribute(f,m_AttributeFlag)+"\u503c\u4e0d\u5e94\u8be5\u5c0f\u4e8e "+a.getAttribute(c,m_AttributeFlag)}else e="";return e}function verifyInputDateValue(a){var d="chinese",h="comparecurrent",b="",i=checkTrim(a.value);if(a.getAttribute(h,m_AttributeFlag)!=null){var f=a.getAttribute(h,m_AttributeFlag),g=new Date,c=i.split("-");if(!(c.length>2)){c=i.split("/");if(!(c.length>2)){b=a.getAttribute(d,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65e5\u671f\u683c\u5f0f";return b}}var e=new Date(c[0],c[1]-1,c[2]);if(f=="1"){if(!(e<g))b=a.getAttribute(d,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5c0f\u4e8e\u5f53\u524d\u65e5\u671f"}else if(f=="2"){if(!(e>g))b=a.getAttribute(d,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5927\u4e8e\u5f53\u524d\u65e5\u671f"}else if(f=="3"){if(!(e<=g))b=a.getAttribute(d,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5c0f\u4e8e\u7b49\u4e8e\u5f53\u524d\u65e5\u671f"}else if(f=="4"){if(!(e>=g))b=a.getAttribute(d,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5927\u4e8e\u7b49\u4e8e\u5f53\u524d\u65e5\u671f"}else b=""}return b}function verifyInputDateTimeValue(a){var d="chinese",i="comparecurrent";try{var b="",l=checkTrim(a.value);if(a.getAttribute(i,m_AttributeFlag)!=null){var f=a.getAttribute(i,m_AttributeFlag),g=new Date,k=l.split(" "),j=k[0],h=k[1].split(":"),c=j.split("-");if(!(c.length>2)){c=j.split("/");if(!(c.length>2)){b=a.getAttribute(d,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65e5\u671f\u65f6\u95f4\u683c\u5f0f";return b}}var e=new Date(c[0],c[1]-1,c[2],h[0],h[1],h[2]);if(f=="1"){if(!(e<g))b=a.getAttribute(d,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5c0f\u4e8e\u5f53\u524d\u65f6\u95f4"}else if(f=="2"){if(!(e>g))b=a.getAttribute(d,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5927\u4e8e\u5f53\u524d\u65f6\u95f4"}else if(f=="3"){if(!(e<=g))b=a.getAttribute(d,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5c0f\u4e8e\u7b49\u4e8e\u5f53\u524d\u65f6\u95f4"}else if(f=="4"){if(!(e>=g))b=a.getAttribute(d,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5927\u4e8e\u7b49\u4e8e\u5f53\u524d\u65f6\u95f4"}else b=""}return b}catch(m){}}function verifyInputTimeValue(a){var c="chinese",i="comparecurrent";try{var b="",j=checkTrim(a.value);if(a.getAttribute(i,m_AttributeFlag)!=null){var e=a.getAttribute(i,m_AttributeFlag),h=new Date,f=h.getHours()*3600+h.getMinutes()*60+h.getSeconds(),g=j.split(":");if(!(g.length>2)){b=a.getAttribute(c,m_AttributeFlag)+"\u5fc5\u987b\u662f\u6b63\u786e\u7684\u65f6\u95f4\u683c\u5f0f";return b}var d=g[0]*3600+g[1]*60+g[2]*1;if(e=="1"){if(!(d<f))b=a.getAttribute(c,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5c0f\u4e8e\u5f53\u524d\u65f6\u95f4"}else if(e=="2"){if(!(d>f))b=a.getAttribute(c,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5927\u4e8e\u5f53\u524d\u65f6\u95f4"}else if(e=="3"){if(!(d<=f))b=a.getAttribute(c,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5c0f\u4e8e\u7b49\u4e8e\u5f53\u524d\u65f6\u95f4"}else if(e=="4"){if(!(d>=f))b=a.getAttribute(c,m_AttributeFlag)+"\u503c\u5e94\u8be5\u5927\u4e8e\u7b49\u4e8e\u5f53\u524d\u65f6\u95f4"}else b=""}return b}catch(k){}}function focusInput(a){if(a.type=="text"||a.type=="textarea"){a.focus();a.select()}else a.focus()}function showMsgInMessageId(){var a=m_msgAll;while(a.search("\n")!=-1)a=a.replace("\n","<br>");document.getElementById(m_MessageId).innerHTML=a}function notMatchInputClass(a){var e="oldclassname",d="notmatchclass";if(a.type=="checkbox"||a.type=="radio"){for(var c=document.getElementsByName(a.name),b=0;b<c.length;b++)if(c[b].getAttribute(d,m_AttributeFlag)!=null){c[b].setAttribute(e,c[b].className,m_AttributeFlag);c[b].className=c[b].getAttribute(d,m_AttributeFlag)}}else if(a.getAttribute(d,m_AttributeFlag)!=null){a.setAttribute(e,a.className);a.className=a.getAttribute(d,m_AttributeFlag)}}function clearNotMatchInputClass(a){var f="oldclassname",e=null,d="notmatchclass";if(a.type=="checkbox"||a.type=="radio"){for(var c=document.getElementsByName(a.name),b=0;b<c.length;b++)if(c[b].getAttribute(d,m_AttributeFlag)!=e&&c[b].getAttribute(d,m_AttributeFlag)==c[b].className)if(c[b].getAttribute(f,m_AttributeFlag)!=e)c[b].className=c[b].getAttribute(f);else c[b].className=""}else if(a.getAttribute(d,m_AttributeFlag)!=e&&a.getAttribute(d,m_AttributeFlag)==a.className)if(a.getAttribute(f,m_AttributeFlag)!=e)a.className=a.getAttribute(f);else a.className=""}function chkAlert(a){if(m_Alert_Mode=="0")alert(a);else alert(a)}function GetFileSize(b){try{var e=new ActiveXObject("Scripting.FileSystemObject"),c=Math.round(e.GetFile(b).Size);return c}catch(a){var d=a.number&65535;d==429&&chkAlert("\u6d4f\u89c8\u5668\u8bbe\u7f6e\u53d7\u9650\uff0c\u8bf7\u6309\u4e0b\u9762\u7684\u6b65\u9aa4\u8bbe\u7f6e\uff1a\n1\u3001\u63a7\u5236\u9762\u677f -> Internet\u9009\u9879 -> \u5b89\u5168 -> Internet -> \u81ea\u5b9a\u4e49\u7ea7\u522b ->\u5b89\u5168\u8bbe\u7f6e\u7684 ActiveX \u63a7\u4ef6\u548c\u63d2\u4ef6 -> \u5bf9\u6ca1\u6709\u6807\u8bb0\u4e3a\u5b89\u5168\u7684ActiveX \u63a7\u4ef6\u8fdb\u884c\u521d\u59cb\u5316\u548c\u811a\u672c\u8fd0\u884c \u9009\u4e2d\u201c\u542f\u7528\u201d\uff0c\u5e76\u786e\u5b9a.\n2\u3001\u63a7\u5236\u9762\u677f -> Internet\u9009\u9879 -> \u5b89\u5168 -> \u672c\u5730 Intranet -> \u81ea\u5b9a\u4e49\u7ea7\u522b ->\u5b89\u5168\u8bbe\u7f6e\u7684 ActiveX \u63a7\u4ef6\u548c\u63d2\u4ef6 -> \u5bf9\u6ca1\u6709\u6807\u8bb0\u4e3a\u5b89\u5168\u7684ActiveX \u63a7\u4ef6\u8fdb\u884c\u521d\u59cb\u5316\u548c\u811a\u672c\u8fd0\u884c \u9009\u4e2d\u201c\u542f\u7528\u201d\uff0c\u5e76\u786e\u5b9a. ")}}function CancelClientEvent(){if(window.event){window.event.cancelBubble=true;window.event.returnValue=false}return false}function checkInputNoFocus(a){clearNotMatchInputClass(a);var b=getMsgType();setMsgType(1);if(a.getAttribute("ischeckinstant",m_AttributeFlag)!="false")if(!verifyInput(a)){setMsgType(b);return false}setMsgType(b);return true}function checkInputExceptNullableNoFocus(b){clearNotMatchInputClass(b);var a=getMsgType();setMsgType(1);if(!verifyInputExceptNullable(b)){setMsgType(a);return false}setMsgType(a);return true}function checkInput(a){clearNotMatchInputClass(a);var b=getMsgType();setMsgType(1);if(!verifyInput(a)){focusInput(a);setMsgType(b);return false}setMsgType(b);return true}function checkInputExceptNullable(a){clearNotMatchInputClass(a);var b=getMsgType();setMsgType(1);if(!verifyInputExceptNullable(a)){focusInput(a);setMsgType(b);return false}setMsgType(b);return true}function getChkInputTop(c){var b=c.offsetTop,a=c.offsetParent;while(a!=null){b=b+a.offsetTop;a=a.offsetParent}return b}function getChkInputLeft(c){var b=c.offsetLeft,a=c.offsetParent;while(a!=null){b=b+a.offsetLeft;a=a.offsetParent}return b}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/lxchutao-ChkInputs.git
git@api.gitlife.ru:oschina-mirror/lxchutao-ChkInputs.git
oschina-mirror
lxchutao-ChkInputs
lxchutao-ChkInputs
master