⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cims.js

📁 这个是j2eejava web 编程精要十五讲的全部源码。对学习java web编程的人来说是很能得的资料
💻 JS
📖 第 1 页 / 共 2 页
字号:
    } function checkSYSdate(formname){    var pass = "Y";    if(formname.fy.value.length != 0 ||             formname.fm.value.length != 0 ||             formname.fd.value.length != 0){        if(!isDate(Number(formname.fy.value),                   Number(formname.fm.value),                   Number(formname.fd.value))){            formname.ty.style.cssText += (';' + "background-color:white;");            formname.tm.style.cssText += (';' + "background-color:white;");            formname.td.style.cssText += (';' + "background-color:white;");            formname.fy.style.cssText += (';' + "background-color:red;");            formname.fm.style.cssText += (';' + "background-color:red;");            formname.fd.style.cssText += (';' + "background-color:red;");            pass = "N";            alert(message("SYSANALYSE_ERR_SELECT_DATE"));        }    }else if(formname.ty.value.length != 0 ||             formname.tm.value.length != 0 ||             formname.td.value.length != 0){        if(!isDate(Number(formname.ty.value),                   Number(formname.tm.value),                   Number(formname.td.value))){            formname.fy.style.cssText += (';' + "background-color:white;");            formname.fm.style.cssText += (';' + "background-color:white;");            formname.fd.style.cssText += (';' + "background-color:white;");            formname.ty.style.cssText += (';' + "background-color:red;");            formname.tm.style.cssText += (';' + "background-color:red;");            formname.td.style.cssText += (';' + "background-color:red;");            pass = "N";            alert(message("SYSANALYSE_ERR_SELECT_DATE"));        }    }else{        formname.fy.style.cssText += (';' + "background-color:white;");        formname.fm.style.cssText += (';' + "background-color:white;");        formname.fd.style.cssText += (';' + "background-color:white;");        formname.ty.style.cssText += (';' + "background-color:white;");        formname.tm.style.cssText += (';' + "background-color:white;");        formname.td.style.cssText += (';' + "background-color:white;");        pass = "Y";    }    return pass;}  function compDate(formname)  {      var pass = "Y";      if(formname.fy.value.length != 0 && formname.fm.value.length != 0 && formname.fd.value.length != 0 &&         formname.ty.value.length != 0 && formname.tm.value.length != 0 && formname.td.value.length != 0){          if(isDate(Number(formname.fy.value),Number(formname.fm.value),Number(formname.fd.value)) &&             isDate(Number(formname.ty.value),Number(formname.tm.value),Number(formname.td.value))){              if (!isFromTo(                  Number(formname.fy.value),                  Number(formname.fm.value),                  Number(formname.fd.value),                  Number(formname.ty.value),                  Number(formname.tm.value),                  Number(formname.td.value))) {                  formname.fy.style.cssText += (';' + "background-color:red;");                  formname.fm.style.cssText += (';' + "background-color:red;");                  formname.fd.style.cssText += (';' + "background-color:red;");                  formname.ty.style.cssText += (';' + "background-color:red;");                  formname.tm.style.cssText += (';' + "background-color:red;");                  formname.td.style.cssText += (';' + "background-color:red;");                  pass = "N";                  alert(message("SYSANALYSE_ERR_SELECT_DATE"));              }else{                  formname.fy.style.cssText += (';' + "background-color:white;");                  formname.fm.style.cssText += (';' + "background-color:white;");                  formname.fd.style.cssText += (';' + "background-color:white;");                  formname.ty.style.cssText += (';' + "background-color:white;");                  formname.tm.style.cssText += (';' + "background-color:white;");                  formname.td.style.cssText += (';' + "background-color:white;");                  pass = "Y";              }          }else{              formname.fy.style.cssText += (';' + "background-color:red;");              formname.fm.style.cssText += (';' + "background-color:red;");              formname.fd.style.cssText += (';' + "background-color:red;");              formname.ty.style.cssText += (';' + "background-color:red;");              formname.tm.style.cssText += (';' + "background-color:red;");              formname.td.style.cssText += (';' + "background-color:red;");              pass = "N";              alert(message("SYSANALYSE_ERR_SELECT_DATE"));          }      }      return pass;  }    function delOptions(objDst,boolSet){        var len = objDst.length-1;        if (boolSet==true){            for(i=len;i>=0;i--){                objDst.remove(i);            }        }        else{            for(i=len;i>0;i--){                objDst.remove(i);            }        }    }    //选择objsrc中的某一项时,在objdst中追加选项    function addOption(objsrc,objdst,boolSet){        //读取另一个frame中的元素;        var objDoc = parent.frames("banner").document;        delOptions(objdst,boolSet);        //var objForm=objdst.form;        var dst;        //objsrc是一个对象时        if (objsrc.value!=null){            dst=objDoc.all.item(objsrc.value);        }        //objsrc是一个字符串时        else {            dst=objDoc.all.item(objsrc);        }        //返回元素不存在时        if (dst==null) return;        //返回一个数组元素        if (dst.length!=null){            for (var i=0;i<dst.length;i++){                var dstValue=dst[i].value;                var arrDst=dstValue.split(",");                var aOption=new Option();                aOption.value=arrDst[0];                aOption.text=arrDst[1];                objdst.add(aOption);            }        }        //返回一个元素        else if (dst.value!=null){                var dstValue=dst.value;                var aOption=new Option();                var arrDst=dstValue.split(",");                aOption.value=arrDst[0];                aOption.text=arrDst[1];                objdst.add(aOption);        }    }    function search(){      var pass="Yes";      var fullFrom=0;      var fullTo=0;      //To Day      if (document.Prm_OS011.tnd.value.length!=0 &&          (isNaN(document.Prm_OS011.tnd.value) ||          document.Prm_OS011.tnd.value<1 ||          document.Prm_OS011.tnd.value>31)){        document.Prm_OS011.tnd.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.tnd.focus();        pass="No";      } else {        document.Prm_OS011.tnd.style.cssText += (';' + "background-color:white;");      }      //To Mooth      if (document.Prm_OS011.tnm.value.length!=0 &&          (isNaN(document.Prm_OS011.tnm.value) ||          document.Prm_OS011.tnm.value<1 ||          document.Prm_OS011.tnm.value>12)) {        document.Prm_OS011.tnm.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.tnm.focus();        pass="No";      } else {        document.Prm_OS011.tnm.style.cssText += (';' + "background-color:white;");      }      //To Year      if (document.Prm_OS011.tny.value.length!=0 &&          (document.Prm_OS011.tny.value.length!=4 ||          isNaN(document.Prm_OS011.tny.value) ||          document.Prm_OS011.tny.value<1 )) {        document.Prm_OS011.tny.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.tny.focus();        pass="No";      } else {        document.Prm_OS011.tny.style.cssText += (';' + "background-color:white;");      }      //From Day      if (document.Prm_OS011.fnd.value.length!=0 &&          (isNaN(document.Prm_OS011.fnd.value) ||          document.Prm_OS011.fnd.value<1 ||          document.Prm_OS011.fnd.value>31)) {        document.Prm_OS011.fnd.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.fnd.focus();        pass="No";      } else {        document.Prm_OS011.fnd.style.cssText += (';' + "background-color:white;");      }      //From Mooth      if (document.Prm_OS011.fnm.value.length!=0 &&          (isNaN(document.Prm_OS011.fnm.value) ||          document.Prm_OS011.fnm.value<1 ||          document.Prm_OS011.fnm.value>12 )) {        document.Prm_OS011.fnm.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.fnm.focus();        pass="No";      } else {        document.Prm_OS011.fnm.style.cssText += (';' + "background-color:white;");      }      //From Year      if (document.Prm_OS011.fny.value.length!=0 &&          (document.Prm_OS011.fny.value.length!=4 ||          isNaN(document.Prm_OS011.fny.value) ||          document.Prm_OS011.fny.value<1 )) {        document.Prm_OS011.fny.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.fny.focus();        pass="No";      } else {        document.Prm_OS011.fny.style.cssText += (';' + "background-color:white;");      }      //To date is full      if (document.Prm_OS011.tny.value.length!=0){        fullTo += 1;      }      if (document.Prm_OS011.tnm.value.length!=0){        fullTo += 2;      }      if (document.Prm_OS011.tnd.value.length!=0){        fullTo += 4;      }      if (fullTo == 1 ){        document.Prm_OS011.tnm.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.tnd.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.tnm.focus();        pass="No";      } else if (fullTo == 2 ){        document.Prm_OS011.tny.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.tnd.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.tny.focus();        pass="No";      } else if (fullTo == 3 ){        document.Prm_OS011.tnd.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.tnd.focus();        pass="No";      } else if (fullTo == 4 ){        document.Prm_OS011.tny.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.tnm.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.tny.focus();        pass="No";      } else if (fullTo == 5 ){        document.Prm_OS011.tnm.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.tnm.focus();        pass="No";      } else if (fullTo == 6 ){        document.Prm_OS011.tnd.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.tnd.focus();        pass="No";      } else if (fullTo == 7 ){        //To date is a date        if (!isDate(            Number(document.Prm_OS011.tny.value),            Number(document.Prm_OS011.tnm.value),            Number(document.Prm_OS011.tnd.value))) {          document.Prm_OS011.tnd.style.cssText += (';' + "background-color:red;");          document.Prm_OS011.tnd.focus();          pass="No";        } else {          document.Prm_OS011.tnd.style.cssText += (';' + "background-color:white;");        }      }      //From date is full      if (document.Prm_OS011.fny.value.length!=0){        fullFrom += 1;      }      if (document.Prm_OS011.fnm.value.length!=0){        fullFrom += 2;      }      if (document.Prm_OS011.fnd.value.length!=0){        fullFrom += 4;      }      if (fullFrom == 1 ){        document.Prm_OS011.fnm.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.fnd.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.fnm.focus();        pass="No";      } else if (fullFrom == 2 ){        document.Prm_OS011.fny.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.fnd.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.fny.focus();        pass="No";      } else if (fullFrom == 3 ){        document.Prm_OS011.fnd.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.fnd.focus();        pass="No";      } else if (fullFrom == 4 ){        document.Prm_OS011.fny.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.fnm.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.fny.focus();        pass="No";      } else if (fullFrom == 5 ){        document.Prm_OS011.fnm.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.fnm.focus();        pass="No";      } else if (fullFrom == 6 ){        document.Prm_OS011.fnd.style.cssText += (';' + "background-color:red;");        document.Prm_OS011.fnd.focus();        pass="No";      } else if (fullFrom == 7 ){        //From date is a date        if (!isDate(            Number(document.Prm_OS011.fny.value),            Number(document.Prm_OS011.fnm.value),            Number(document.Prm_OS011.fnd.value))) {          document.Prm_OS011.fnd.style.cssText += (';' + "background-color:red;");          document.Prm_OS011.fnd.focus();          pass="No";        } else {          document.Prm_OS011.fnd.style.cssText += (';' + "background-color:white;");        }      }      //FromDate < ToDate      if (pass=="Yes" && fullFrom == 7 && fullTo == 7) {        if (!isFromTo(            Number(document.Prm_OS011.fny.value),            Number(document.Prm_OS011.fnm.value),            Number(document.Prm_OS011.fnd.value),            Number(document.Prm_OS011.tny.value),            Number(document.Prm_OS011.tnm.value),            Number(document.Prm_OS011.tnd.value))) {          document.Prm_OS011.fny.style.cssText += (';' + "background-color:red;");          document.Prm_OS011.fnm.style.cssText += (';' + "background-color:red;");          document.Prm_OS011.fnd.style.cssText += (';' + "background-color:red;");          document.Prm_OS011.tny.style.cssText += (';' + "background-color:red;");          document.Prm_OS011.tnm.style.cssText += (';' + "background-color:red;");          document.Prm_OS011.tnd.style.cssText += (';' + "background-color:red;");          document.Prm_OS011.fny.focus();          pass="No";        } else {          document.Prm_OS011.fny.style.cssText += (';' + "background-color:white;");          document.Prm_OS011.fnm.style.cssText += (';' + "background-color:white;");          document.Prm_OS011.fnd.style.cssText += (';' + "background-color:white;");          document.Prm_OS011.tny.style.cssText += (';' + "background-color:white;");          document.Prm_OS011.tnm.style.cssText += (';' + "background-color:white;");          document.Prm_OS011.tnd.style.cssText += (';' + "background-color:white;");        }      }      //Pass or not      if (pass=="Yes") {        document.Prm_OS011.submit();      } else {        alert(message("PRM_OS010_ERR_INPUT_DATE"));      }    }   function getStrLen(str){        var len=0;        for (var i=0;i<str.length;i++){            if (str.charCodeAt(i)>255) len+=2; else len++;        }        return len;   }   function checkKeyCode(objForm) {       if (window.event.keyCode==13) {           objForm.c1.click();       }   }   function windowOpen(strUrl,strTarget){       window.open(strUrl,strTarget,                   toolbar='no',                   location ='no',                   directions ='no',                   status ='no',                   menubar='no',                   scrollbar='no',                   width='no',                   height='no');   }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -