본문 바로가기

Programming/HTML

[HTML] 간단함 폼(form) 구문

<script language="JavaScript">
function check_value() {

 if (form.ID.value == "") {
   alert("아이디(ID)를 입력해 주세요.");
   form.ID.focus();
   return false;
 }
}
</script>

<form name="form" method="post" action="<?=$PHP_SELF;?>" enctype="multipart/form-data" onSubmit="return check_value();">
<input type=hidden name=id value=<?=$id?>>
<input type="submit" name="ok">
</form>