function findCheck(findForm){ if(findForm.findWord.value.length < 2){ alert("검색단어는 최소 2자 이상 입력해 주세요."); findForm.findWord.value = ""; findForm.findWord.focus(); return false; } if(findForm.findOption.value == "totDoc.startDate" || findForm.findOption.value == "totDoc.repoEndDate" || findForm.findOption.value == "startDate" || findForm.findOption.value == "regDate" || findForm.findOption.value == "endDate"){ var str = /[0-9]{2}[\-][0-1][0-9][\-][0-3][0-9]$/; if(!str.test(findForm.findWord.value)){ alert("10-12-01 형태로 입력해 주세요"); findForm.findWord.value = ""; findForm.findWord.focus(); return false; } } return true; } function showMSG(str, msg){ if(str.endsWith("Date")){ msg.style.display="block"; }else{ msg.style.display="none"; } } String.prototype.startsWith = function(prefix) { return this.indexOf(prefix) === 0; } String.prototype.endsWith = function(suffix) { return this.match(suffix+"$") == suffix; };