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

📄 cims.js

📁 这个是j2eejava web 编程精要十五讲的全部源码。对学习java web编程的人来说是很能得的资料
💻 JS
📖 第 1 页 / 共 2 页
字号:
    // Alter messages    function message(msg) {      if (msg == "") return false;      var mez = false;      switch (msg) {        // ClientCheck        case 'LOGIN_ERR_INPUT_DATA': mez = '请输入必要的信息或正确长度的信息'; break;        case 'DATE_ERR_INPUT_DATE': mez = '请输入正确的日期'; break;        case 'PRM_OS011_ERR_NO_CHECK_CONFIRM': mez = '请选择要删除的记录'; break;        case 'PRICE_ERR_INPUT_PRICE': mez = '请输入正确的价格'; break;        case 'CROPSIZE_ERR_INPUT_CROPSIZE': mez = '请输入正确的企业人数'; break;        case 'YEARTAKING_ERR_INPUT_YEARTAKING': mez = '请输入正确的企业年收入'; break;        case 'ASSET_ERR_INPUT_ASSET': mez = '请输入正确的企业资产'; break;        case 'SYSANALYSE_ERR_SELECT_DATE': mez = '请输入正确的日期.'; break;        case "ERR_INPUT_DATE" :mez="请输入正确的日期"; break;        case "ERR_INPUT_AUTOID" :mez="请输入车辆识别编号"; break;        case "ERR_INPUT_PAGE" :mez="请输入正确的页数,正确的页数为:1-"; break;        case "ERR_INPUT_QUALITYREASON" :mez="请输入质量问题"; break;        case "ERR_NO_SELECTED_RECORD" :mez="请选择要删除的记录"; break;        case "SURE_DELETE" :mez="确信要删除选定的记录吗"; break;        case "ERR_NOT_INPUT_USERID" :mez="请输入用户名"; break;        case "ERR_NOT_INPUT_PASSWORD" :mez="请输入密码"; break;        case "ERR_INPUT_PASSWORD" :mez="用户名或密码不正确"; break;        case "ERR_INPUT_CUSTOMER":mez="请输入正确的客户编码";break;  //end adding by wbb on 2003/06/23        default:   mez = '未知的错误'; break;      }      return mez;    }  //*******Check input data and submit ------------------------------***************8    function searchsale(fny,fnm,fnd,tny,tnm,tnd){      var pass="Yes";      var fullFrom=0;      var fullTo=0;      var sale="no";      if (tnd.value.length!=0 &&          (isNaN(tnd.value) ||           tnd.value<1 ||           tnd.value>31)){           tnd.style.cssText += (';' + "background-color:red;");           tnd.focus();        pass="No";      } else {        tnd.style.cssText += (';' + "background-color:white;");      }      //To Mooth      if (tnm.value.length!=0 &&          (isNaN(tnm.value) ||          tnm.value<1 ||          tnm.value>12)) {        tnm.style.cssText += (';' + "background-color:red;");        tnm.focus();        pass="No";      } else {        tnm.style.cssText += (';' + "background-color:white;");      }      //To Year      if (tny.value.length!=0 &&          (tny.value.length!=4 ||          isNaN(tny.value) ||          tny.value<1 )) {        tny.style.cssText += (';' + "background-color:red;");        tny.focus();        pass="No";      } else {        tny.style.cssText += (';' + "background-color:white;");      }      //From Day      if (fnd.value.length!=0 &&          (isNaN(fnd.value) ||          fnd.value<1 ||          fnd.value>31)) {        fnd.style.cssText += (';' + "background-color:red;");        fnd.focus();        pass="No";      } else {        fnd.style.cssText += (';' + "background-color:white;");      }      //From Mooth      if (fnm.value.length!=0 &&          (isNaN(fnm.value) ||          fnm.value<1 ||          fnm.value>12 )) {        fnm.style.cssText += (';' + "background-color:red;");        fnm.focus();        pass="No";      } else {        fnm.style.cssText += (';' + "background-color:white;");      }      //From Year      if (fny.value.length!=0 &&          (fny.value.length!=4 ||          isNaN(fny.value) ||          fny.value<1 )) {        fny.style.cssText += (';' + "background-color:red;");        fny.focus();        pass="No";      } else {        fny.style.cssText += (';' + "background-color:white;");      }      //To date is full      if (tny.value.length!=0){        fullTo += 1;      }      if (tnm.value.length!=0){        fullTo += 2;      }      if (tnd.value.length!=0){        fullTo += 4;      }      if (fullTo == 1 ){        tnm.style.cssText += (';' + "background-color:red;");        tnd.style.cssText += (';' + "background-color:red;");        tnm.focus();        pass="No";      } else if (fullTo == 2 ){        tny.style.cssText += (';' + "background-color:red;");        tnd.style.cssText += (';' + "background-color:red;");        tny.focus();        pass="No";      } else if (fullTo == 3 ){        tnd.style.cssText += (';' + "background-color:red;");        tnd.focus();        pass="No";      } else if (fullTo == 4 ){        tny.style.cssText += (';' + "background-color:red;");        tnm.style.cssText += (';' + "background-color:red;");        tny.focus();        pass="No";      } else if (fullTo == 5 ){        tnm.style.cssText += (';' + "background-color:red;");        tnm.focus();        pass="No";      } else if (fullTo == 6 ){        tnd.style.cssText += (';' + "background-color:red;");        tnd.focus();        pass="No";      } else if (fullTo == 7 ){        //To date is a date        if (!isDate(            Number(tny.value),            Number(tnm.value),            Number(tnd.value))) {          tnd.style.cssText += (';' + "background-color:red;");          tnd.focus();          pass="No";        } else {          tnd.style.cssText += (';' + "background-color:white;");        }      }      //From date is full      if (fny.value.length!=0){        fullFrom += 1;      }      if (fnm.value.length!=0){        fullFrom += 2;      }      if (fnd.value.length!=0){        fullFrom += 4;      }      if (fullFrom == 1 ){        fnm.style.cssText += (';' + "background-color:red;");        fnd.style.cssText += (';' + "background-color:red;");        fnm.focus();        pass="No";      } else if (fullFrom == 2 ){        fny.style.cssText += (';' + "background-color:red;");        fnd.style.cssText += (';' + "background-color:red;");        fny.focus();        pass="No";      } else if (fullFrom == 3 ){        fnd.style.cssText += (';' + "background-color:red;");        fnd.focus();        pass="No";      } else if (fullFrom == 4 ){        fny.style.cssText += (';' + "background-color:red;");        fnm.style.cssText += (';' + "background-color:red;");        fny.focus();        pass="No";      } else if (fullFrom == 5 ){        fnm.style.cssText += (';' + "background-color:red;");        fnm.focus();        pass="No";      } else if (fullFrom == 6 ){        fnd.style.cssText += (';' + "background-color:red;");        pass="No";        fnd.focus();      } else if (fullFrom == 7 ){        //From date is a date        if (!isDate(            Number(fny.value),            Number(fnm.value),            Number(fnd.value))) {          fnd.style.cssText += (';' + "background-color:red;");          fnd.focus();          pass="No";        } else {          fnd.style.cssText += (';' + "background-color:white;");        }      }      //FromDate < ToDate      if (pass=="Yes" && fullFrom == 7 && fullTo == 7) {        if (!isFromTo(            Number(fny.value),            Number(fnm.value),            Number(fnd.value),            Number(tny.value),            Number(tnm.value),            Number(tnd.value))) {          fny.style.cssText += (';' + "background-color:red;");          fnm.style.cssText += (';' + "background-color:red;");          fnd.style.cssText += (';' + "background-color:red;");          tny.style.cssText += (';' + "background-color:red;");          tnm.style.cssText += (';' + "background-color:red;");          tnd.style.cssText += (';' + "background-color:red;");          fny.focus();          pass="No";        } else {          fny.style.cssText += (';' + "background-color:white;");          fnm.style.cssText += (';' + "background-color:white;");          fnd.style.cssText += (';' + "background-color:white;");          tny.style.cssText += (';' + "background-color:white;");          tnm.style.cssText += (';' + "background-color:white;");          tnd.style.cssText += (';' + "background-color:white;");        }      }      if (pass=="No") {         alert(message("DATE_ERR_INPUT_DATE"));      }      return pass;   }    function searchex(tny,tnm,tnd){      var pass="Yes";      var passe="Yes";      var fullFrom=0;      var fullTo=0;      var exsale="no";      var fullFromd=0;      var fullToe=0;      //To Day      if (tnd.value.length!=0 &&          (isNaN(tnd.value) ||          tnd.value<1 ||          tnd.value>31)){        tnd.style.cssText += (';' + "background-color:red;");        tnd.focus();        pass="No";      } else{        tnd.style.cssText += (';' + "background-color:white;");      }      //To Mooth      if (tnm.value.length!=0 &&          (isNaN(tnm.value) ||          tnm.value<1 ||          tnm.value>12)) {        tnm.style.cssText += (';' + "background-color:red;");        tnm.focus();        pass="No";      } else {        tnm.style.cssText += (';' + "background-color:white;");      }      //To Year      if (tny.value.length!=0 &&          (tny.value.length!=4 ||          isNaN(tny.value) ||          tny.value<1)){        tny.style.cssText += (';' + "background-color:red;");        tny.focus();        pass="No";      } else {        tny.style.cssText += (';' + "background-color:white;");      }      //To date is full      if (tny.value.length!=0){        fullTo += 1;      }      if (tnm.value.length!=0){        fullTo += 2;      }      if (tnd.value.length!=0){        fullTo += 4;      }      if (fullTo == 1 ){        tnm.style.cssText += (';' + "background-color:red;");        tnd.style.cssText += (';' + "background-color:red;");        tnm.focus();        pass="No";      } else if (fullTo == 2 ){        tny.style.cssText += (';' + "background-color:red;");        tnd.style.cssText += (';' + "background-color:red;");        tny.focus();        pass="No";      } else if (fullTo == 3 ){        tnd.style.cssText += (';' + "background-color:red;");        tnd.focus();        pass="No";      } else if (fullTo == 4 ){        tny.style.cssText += (';' + "background-color:red;");        tnm.style.cssText += (';' + "background-color:red;");        tny.focus();        pass="No";      } else if (fullTo == 5 ){        tnm.style.cssText += (';' + "background-color:red;");        tnm.focus();        pass="No";      } else if (fullTo == 6 ){        tnd.style.cssText += (';' + "background-color:red;");        tnd.focus();        pass="No";      } else if (fullTo == 7 ){        //To date is a date        if (!isDate(            Number(tny.value),            Number(tnm.value),            Number(tnd.value))) {          tnd.style.cssText += (';' + "background-color:red;");          tnd.focus();          pass="No";        } else {          tnd.style.cssText += (';' + "background-color:white;");        }      }       if(pass=="No") {        alert(message("DATE_ERR_INPUT_DATE"));       }      return pass;   }  function getYear(d) {      return (d < 1000) ? d + 1900 : d;    }  function isDate (year, month, day) {     // month argument must be in the range 1 - 12      month = month - 1;  // javascript month range : 0- 11      var tempDate = new Date(year,month,day);      if ( (getYear(tempDate.getYear()) == year) &&        (month == tempDate.getMonth()) &&        (day == tempDate.getDate()) )         return true;       else        return false;    }    //formDate <= toDate    function isFromTo(year1, month1, day1, year2, month2, day2) {     // month argument must be in the range 1 - 12      month1 = month1 - 1;  // javascript month range : 0- 11      month2 = month2 - 1;  // javascript month range : 0- 11      var Date1 = new Date(year1, month1, day1);      var Date2 = new Date(year2, month2, day2);      if (Date.parse(Date1) <= Date.parse(Date2)){       return true;      } else {      return false;      }

⌨️ 快捷键说明

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