나누미넷 도움말 센터

Home > [리눅스호스팅]메일 폼 예제 소스

[리눅스호스팅]메일 폼 예제 소스

<html>

<head>
<title>FormMail</title>
<script>
function send() {
if(document.sendform.to_mail.value.length==0) {
alert("받는사람의 E-mail을 입력하세요!");
document.sendform.to_mail.focus();
return false;
}
if(document.sendform.from_mail.value.length==0) {
alert("보내는사람의 E-mail을 입력하세요!");
document.sendform.from_mail.focus();
return false;
}
if(document.sendform.content.value.length==0) {
alert("내용을 입력하세요!");
document.sendform.content.focus();
return false;
}
document.sendform.submit();
}
</script>
</head>
<body>
<form name="sendform" method=post action="sendmail.php">
<table border="1" cellspacing="1" bgcolor="#F2F2F9" bordercolordark="white" bordercolorlight="#BAC0FA" style="border-width:1pt; border-color:blue; border-style:dotted;" align="center" width="400">
<tr>
<td colspan=2 align=center><font color="#0000CC"><b>Mail 보내기</b></font></td>
</tr>
<tr>
<td bgcolor="#D6D7FF" align=right><font color="blue" face="굴림" size="2">받는사람 이름 </font></td>
<td><input type=text onMouseOver="this.style.background='#fdf6f6'" onMouseOut="this.style.background='#f7f7fd'" name="to_name" style="color:blue; background-color:rgb(247,247,255); border-width:1; border-color:blue; border-style:solid;"></td>
</tr>
<tr>
<td bgcolor="#D6D7FF" align=right><font color="blue" face="굴림" size="2">받는사람 E-mail </font></td>
<td><input type=text onMouseOver="this.style.background='#fdf6f6'" onMouseOut="this.style.background='#f7f7fd'" name="to_mail" style="color:blue; background-color:rgb(247,247,255); border-width:1; border-color:blue; border-style:solid;" value=""></td>
</tr>
<tr>
<td bgcolor="#D6D7FF" align=right><font color="blue" face="굴림" size="2">보내는사람 이름 </font></td>
<td><input type=text onMouseOver="this.style.background='#fdf6f6'" onMouseOut="this.style.background='#f7f7fd'" name="from_name" style="color:blue; background-color:rgb(247,247,255); border-width:1; border-color:blue; border-style:solid;"></td>
</tr>
<tr>
<td bgcolor="#D6D7FF" align=right><font color="blue" face="굴림" size="2">보내는사람 E-mail </font></td>
<td><input type=text onMouseOver="this.style.background='#fdf6f6'" onMouseOut="this.style.background='#f7f7fd'" name="from_mail" style="color:blue; background-color:rgb(247,247,255); border-width:1; border-color:blue; border-style:solid;"></td>
</tr>
<tr>
<td bgcolor="#D6D7FF" align=right><font color="blue" face="굴림" size="2">제목 </font></td>
<td><input type=text onMouseOver="this.style.background='#fdf6f6'" onMouseOut="this.style.background='#f7f7fd'" size="35" name="title" style="color:blue; background-color:rgb(247,247,253); border-width:1; border-color:blue; border-style:solid;"></td>
</tr>
<tr>
<td colspan="2" align=center><textarea name="content" onMouseOver="this.style.background='#fdf6f6'" onMouseOut="this.style.background='#e1e2fc'" rows="10" cols="50" style="color:blue; background-color:rgb(212,212,250); border-width:1; border-color:blue; border-style:solid;"></textarea></td>
</tr>
<tr>
<td colspan="2" align=center><input type="button" value="편지보내기" onClick="self.send();" style="font-size:9pt; color:blue; background-color:rgb(225,226,252); border-width:1; border-color:blue; border-style:solid; height:18;" name="send">   <input type="reset" value="다시쓰기" style="font-size:9pt; color:blue; background-color:rgb(231,227,255); border-width:1; border-color:blue; border-style:solid; height:18;" name="reset"></td>
</tr>
</table>
</form>
</body>

</html>