/* memberscript.js */
// 회원 입력 내용 확인.
function checkWrite() {
if(document.writeForm.name.value==""){
alert('이름을 입력하세요...');
document.writeForm.name.focus();
} else if(document.writeForm.id.value==""){
alert('아이디를 입력하세요...');
document.writeForm.id.focus();
} else if(document.writeForm.pwd.value==""){
alert('패스워드를 입력하세요...');
document.writeForm.pwd.focus();
} else if(document.writeForm.pwd.value != document.writeForm.repwd.value){
alert('패스워드가 틀립니다...');
document.writeForm.repwd.focus();
} else if(document.writeForm.email.value==""){
alert('이메일을 입력하세요...');
document.writeForm.email.focus();
} else if(document.writeForm.tel_1.value==""){
alert('전화번호를 입력하세요...');
document.writeForm.tel_1.focus();
} else if(document.writeForm.tel_2.value==""){
alert('전화번호를 입력하세요...');
document.writeForm.tel_2.focus();
} else if(document.writeForm.tel_3.value==""){
alert('전화번호를 입력하세요...');
document.writeForm.tel_3.focus();
} else if(document.writeForm.addr.value==""){
alert('주소를 입력하세요...');
document.writeForm.addr.focus();
} else {
document.writeForm.submit();
}
}
// ID 중복 확인
function checkId(){
let uid = document.writeForm.id.value;
if(uid == ""){
alert("아이디를 입력하세요...");
document.writeForm.focus();
} else {
window.open("./checkid.jsp?id=" + uid, "", "left=200px, top=200px, width=500px, height=300px");
}
}
function login() {
if(document.loginForm.id.value == ""){
alert('아이디를 입력하세요....');
document.loginForm.id.focus();
} else if(document.loginForm.pwd.value == ""){
alert('비밀번호를 입력하세요....');
document.loginForm.pwd.focus();
} else {
document.loginForm.submit();
}
}
function checkModify() {
if(document.modifyForm.name.value==""){
alert('이름을 입력하세요...');
document.modifyForm.name.focus();
} else if(document.modifyForm.id.value==""){
alert('아이디를 입력하세요...');
document.modifyForm.id.focus();
} else if(document.modifyForm.pwd.value==""){
alert('패스워드를 입력하세요...');
document.modifyForm.pwd.focus();
} else if(document.modifyForm.pwd.value != document.modifyForm.repwd.value){
alert('패스워드가 틀립니다...');
document.modifyForm.repwd.focus();
} else if(document.modifyForm.email.value==""){
alert('이메일을 입력하세요...');
document.modifyForm.email.focus();
} else if(document.modifyForm.tel_1.value==""){
alert('전화번호를 입력하세요...');
document.modifyForm.tel_1.focus();
} else if(document.modifyForm.tel_2.value==""){
alert('전화번호를 입력하세요...');
document.modifyForm.tel_2.focus();
} else if(document.modifyForm.tel_3.value==""){
alert('전화번호를 입력하세요...');
document.modifyForm.tel_3.focus();
} else if(document.modifyForm.addr.value==""){
alert('주소를 입력하세요...');
document.modifyForm.addr.focus();
} else {
document.modifyForm.submit();
}
}