31 lines
566 B
JavaScript
31 lines
566 B
JavaScript
// 공통 JavaScript 함수들
|
|
|
|
// 폼 유효성 검사
|
|
function validateForm(formId) {
|
|
const form = document.getElementById(formId);
|
|
if (!form.checkValidity()) {
|
|
form.reportValidity();
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// 로딩 표시
|
|
function showLoading() {
|
|
const modal = document.getElementById('loadingModal');
|
|
if (modal) {
|
|
modal.style.display = 'flex';
|
|
}
|
|
}
|
|
|
|
function hideLoading() {
|
|
const modal = document.getElementById('loadingModal');
|
|
if (modal) {
|
|
modal.style.display = 'none';
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|