테스트 사이트 - 개발 중인 베타 버전입니다

한번만 submit 되게 하기 입니다.

· 9년 전 · 219

<HTML>
<HEAD>
<META http-equiv="content-type" content="text/html; charset=euc-kr">

<SCRIPT LANGUAGE="JavaScript">
<!--
var submitcount=0;

function reset() {
document.emailform.name.value="";
document.emailform.email.value="";
document.emailform.comments.value="";
}

function checkFields() {
if ( (document.emailform.name.value=="")  ||
    (document.emailform.email.value=="") ||
    (document.emailform.comments.value=="") )
  {
  alert("항목을 채워주세요");
  return false;
  }

else
  {
  if (submitcount == 0)
      {
      submitcount++;
      return true;
      }
  else
      {
      alert("버튼은 한번만 눌러주세요");
      return false;
      }
  }
}
//-->
</script>


</HEAD>

<BODY onLoad="reset()">


<form method=post action="#" name="emailform" onSubmit="return checkFields()">

<input type=hidden name=to value="이메일@주소">
<input type=hidden name=subject value="메일제목">

<pre>
이  름 :  <input type=text name="name">
이메일 :  <input type=text name="email">

하실말씀

<textarea name="comments" wrap="virtual" rows="7" cols="45"></Textarea>
<input type=submit>
</pre>
</form>

</BODY>
</HTML>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

게시글 목록

번호 제목
12357
12356
12355
12354
12353
20387
12352
12351
12350
12349
12348
12347
12346
12345
12344
12343
12342
12341
12340
12339
12338
12337
12336
12335
12334