-
211012_form전송(checkbox, radio,select,array)JSP 2021. 10. 12. 17:49
html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<h3>폼태그 연습_#4</h3>
<form action="ex13_formaction.jsp" method="post">
<table class="table table-bordered" style="width: 400px;">
<tr>
<th width="100" bgcolor="orange">상품명</th>
<td>
<input type="text" name="sang" class="form-control" required="required">
</td>
</tr>
<tr>
<!-- 다중출력 -->
<th width="100" bgcolor="orange">색상</th>
<td>
<input type="checkbox" name="scolor" value="orange">오렌지색
<input type="checkbox" name="scolor" value="pink">분홍색
<input type="checkbox" name="scolor" value="blue">파랑색
<input type="checkbox" name="scolor" value="yellow">노랑색
<input type="checkbox" name="scolor" value="green">초록색
</td>
</tr>
<tr>
<th width="100" bgcolor="orange">사이즈</th>
<td>
<input type="radio" name="ssize" value="90">90
<input type="radio" name="ssize" value="95" checked="checked">95
<input type="radio" name="ssize" value="100">100
<input type="radio" name="ssize" value="105">105
</td>
</tr>
<tr>
<th width="100" bgcolor="orange">추가선택</th>
<td>
<select name="schuga" class="form-control">
<option value="운동화">운동화</option>
<option value="반바지">반바지</option>
<option value="티셔츠">티셔츠</option>
<option value="자켓">자켓</option>
</select>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<button type="submit" class="btn btn-info">서버로 전송</button>
</td>
</tr>
</table>
</form>
</body>
</html>
'JSP' 카테고리의 다른 글
211019_복습(jsp) (0) 2021.10.19 211019_jsp로 게시판 만들기 (0) 2021.10.19 211012_form전송(back) (0) 2021.10.12 211012_form전송(checkbox) (0) 2021.10.12 211012_form전송(post,get) (0) 2021.10.12