기본

간단한 폼메일 스크립트 입니다.

by 보석 posted Sep 08, 2013
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 게시글 수정 내역 댓글로 가기 인쇄
Extra Form
미리보기 http://linfree.com/javaboard/29.html


<!---- [1단계] 아래의 소스코드를 <HEAD>와 </HEAD> 사이에 붙여 넣으세요 ---->

<script Language="JavaScript">
<!--
function mailIt(form) {
var data = document.dataForm
var userInfo = ""

form.action += data.recipient.value
form.action += "?subject=" + data.subject.value

userInfo += "사이트 제목 :  " +	document.title + "\n"
userInfo += "사이트 경로 : " +	document.location + "\n\n"

form.mailBody.value =	"\n" + userInfo + "\n"+data.name.value + "\n" + data.email.value
+ "\n"+data.comments.value
return true
}
//-->
</script>

<!------------------------- 여기까지 ---------------------------------->

</HEAD>

<BODY>

<!---- [2단계] 아래의 코드를 원하는 위치에 복사 해 넣으세요 -------------------->

<table border=0 width=500 align=center cellspacing=5 cellpadding=5>
<form NAME="dataForm">
<tr>
<th ALIGN="right" bgColor=#F5F5F5>받는사람
<td bgColor=white><input NAME="recipient" SIZE="40" VALUE="master@linfree.com">
</tr>
<tr>
<th ALIGN="right" bgColor=#F5F5F5>제 목
<td bgColor=white><input NAME="subject" SIZE="40" VALUE="안녕하세요">
</tr>

<tr>
<th ALIGN="right" VALIGN="top" bgColor=#F5F5F5>보내는 사람 이름
<td bgColor=white><input NAME="name" SIZE="40" VALUE>
</tr>
<tr>
<th ALIGN="right" VALIGN="top" bgColor=#F5F5F5>보내는 사람 Email
<td bgColor=white><input NAME="email" SIZE="40" VALUE>
</tr>
<tr>
<th ALIGN="right" VALIGN="top" bgColor=#F5F5F5>내 용
<td bgColor=white><textarea NAME="comments" cols="40" rows=10></textarea>
</tr>
</form>

<form NAME="mailForm" ACTION="mailto:" METHOD="post" ENCTYPE="text/plain" onSubmit="return mailIt(this)">
<input TYPE="hidden" NAME="mailBody" VALUE="linfree Web Mail"><br>
<tr>
<td COLSPAN="2" ALIGN="center" bgColor=white>
<input TYPE="submit" VALUE="보내기">
</tr>
</form>

</table>

<!------------------------- 여기까지 ---------------------------------->




간단한 폼메일 스크립트 입니다.



Articles

1 2 3