양식을 제출하는 방법에는 여러 가지가 있습니다.
전송 시 특정 함수 호출의 유효성을 검사하는 간단한 예!!
<form action"url" onsubmit="retunr check(this);" method="post">
<input type="text" name="check" id="check" value="">
</form>
function check(f){
if(f.check.value == ""){
alert("내용을 입력해주세요!!");
return false;
}else{
retunr true;
}
}
false를 리턴하여 제출을 종료하고 true로 제출을 계속하십시오!!