$('form').on('submit',function(e){
if(document.querySelector('#id_input').value == ''){
alert('아이디를입렵해주세요');
e.preventDefault();
}else if(document.querySelector('#ps_input').value == ''){
alert('비번을입력해주세요');
e.preventDefault();
}else if(document.querySelector('#ps_input').value.length <= 6){
alert('비번이 너무 작습니다');
e.preventDefault();
}
});
요렇게 하면 실행 잘되는데요 ..
if(document.querySelector('#id_input').value == '') 이거 이프문 조건이 길어서
var inputVal = document.querySelector('#id_input').value;
요렇게 변수주고
if( inputVal == '') 이렇게 주고 하면 안되요 ㅠㅠ 왜 그럴까요 ㅠㅠ선생님