You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.0 KiB
35 lines
1.0 KiB
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; |
|
};
|
|
|