person.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form>
<table border="1" cellspacing="0" cellpadding="5">
<tr>
<th width="70">이름</th>
<td>
<input type="text" name="name" size="20" placeholder="이름입력"/>
</td>
</tr>
<tr>
<th>성별</th>
<td><!-- radio는 배열로 보내기 때문에 0, 1로 보내는게 좋다. -->
<input type="radio" name="gender" value="0" checked/>남자
<input type="radio" name="gender" value="1"/>여자
</td>
</tr>
radio는 배열로 보내기 때문에 0, 1로 보내는게 좋다.
<tr>
<th>색깔</th>
<td>
<select name="color" style="width: 100px;">
<optgroup label="색깔">
<option value="red" selected="selected">빨강</option>
<option value="green">초록</option>
<option value="blue">파랑</option>
<option value="magenta">보라</option>
<option value="cyan">하늘</option>
</optgroup>
</select>
</td>
</tr>
<tr>
<th>취미</th>
<td>
<label>
<input type="checkbox" name="hobby"/>독서
</label>
<label>
<input type="checkbox" name="hobby"/>영화
</label>
<label>
<input type="checkbox" name="hobby"/>음악
</label>
<label>
<input type="checkbox" name="hobby"/>게임
</label>
<label>
<input type="checkbox" name="hobby"/>운동
</label>
</td>
</tr>
label을 하게 되면 이름만 눌러도 선택이 된다 !!
<tr>
<td align="center">과목</td>
<td colspan="2">
<label>
<select name="subject" multiple size="6" style="width: 120px;">
<option value="JAVA">JAVA</option>
<option value="Servlet">Servlet</option>
<option value="HTML" selected="selected">HTML</option>
<option value="Spring">Spring</option>
</select>
</label>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="SEND"/>
<input type="reset" value="CANCEL"/>
</td>
</tr>
</table>
</form>
</body>
</html>
'HOMEWORK' 카테고리의 다른 글
DAY 28 - ORACLE DB HOMEWORK (2024.08.09) (0) | 2024.08.11 |
---|---|
DAY 28 - CSS HOMEWORK (2024.08.09) (0) | 2024.08.11 |
DAY 16 SCHOOL HOMEWORK (2024.07.24) (0) | 2024.08.08 |
DAY 18 - BOARD HOMEWORK (2024.07.26) (0) | 2024.08.08 |
DAY 27 - HTML 과제 (2024.08.08) (0) | 2024.08.08 |