2013년 7월 9일 화요일

(130709) 12일차 FormTest.html, FormTest2.html (회원가입 Form 만들기)

 - FormTest.html 소스 (테이블 사용 안함)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title> 회원가입 폼!! </title>
</head>
<body bgcolor = lightyellow> <h2><b> 회원가입 폼!! </b></h2>
<form>
<p> 아 이 디 : <input type = "text" name = "id"> &nbsp; &nbsp; &nbsp; <b>*8자 이내</b> <br></p>

<p> 비밀번호 : <input type = "password" name = "pass"> &nbsp; &nbsp; &nbsp;
성 명 : <input type = "text" name = "name", size = "14"> <br></p>

<p> 성 별 :<input type = "radio" name = "gender" value = "male" checked> 남성
<input type = "radio" name = "gender" value = "female"> 여성 &nbsp; &nbsp; &nbsp; &nbsp;

취 미 :<input type = "checkbox" name = "music" checked = "checked"> 음악감상
<input type = "checkbox" name = "movie"> 영화감상 <br> </p>

<p> H.P : <select name = "phone">
<option value = "010"> 010 </option>
<option value = "011"> 011 </option>
<option value = "070"> 070 </option>
</select> 
&nbsp; - <input type = "text" name = "phone2" size = "6"> 
&nbsp; - <input type = "text" name = "phone3" size = "6">
&nbsp; &nbsp; &nbsp; <b>*필수입력</b> <br></p>

<p> 자기소개 : <textarea rows="2" cols="45"></textarea> <br></p>

<p> <input type = "submit" value = "전송">
<input type = "reset" value = "취소"> <br></p>
</form>
</body>
</html>


 - 결과
























 - FormTest2.html (테이블 사용)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title> 회원가입 폼!! </title>
</head>
<body bgcolor = lightyellow> <h2><b> 회원가입 폼!! </b></h2>
<table border = 0 width = 530 height = 300>
<tr>
<!-- td는 보통글씨, th는 굵은글씨 -->
<td colspan = "2" align = "left"> 아이디 : <input type = "text" name = "id"> </td>
<th colspan = "2" align = "right"> *8자 이내 </th>
</tr>

<tr>
<td colspan = "2" align = "left"> 비밀번호 : <input type = "password" name = "pass"> </td>
<td colspan = "2" align = "right"> 성명 : <input type = "text" name = "name", size = "14"> </td>
</tr>

<tr>
<td colspan = "2" align = "left"> 
성별 :<input type = "radio" name = "gender" value = "male" checked> 남성
<input type = "radio" name = "gender" value = "female"> 여성</td>
<td colspan = "2" align = "right">
취미 :<input type = "checkbox" name = "music" checked = "checked"> 음악감상
<input type = "checkbox" name = "movie"> 영화감상 </td>
</tr>

<tr>
<td colspan = "3" align = "left">
H.P : <select name = "phone">
<option value = "010"> 010 </option>
<option value = "011"> 011 </option>
<option value = "070"> 070 </option>
</select> 
&nbsp; - <input type = "text" name = "phone2" size = "6"> 
&nbsp; - <input type = "text" name = "phone3" size = "6"> </td>
<th align = "right"> *필수입력 </th>
</tr>

<tr>
<td colspan = "4" align = "left"> 자기소개 : <textarea rows="2" cols="50"></textarea> </td>
</tr>

<tr>
<td colspan = "4" align = "center">
<input type = "submit" value = "전송">
<input type = "reset" value = "취소">
</td>
</tr>
</body>
</html>


 - 소스