Notice
Recent Posts
Recent Comments
Link
«   2024/10   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

WON.dev

index 본문

JSP/SEARCH

index

GAWON 2023. 6. 12. 17:11
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
	div{
		width: 800px;
		text-align: center;
		margin: auto;
	}
	table {
		width: 100%;
		border-collapse: collapse;
	}
	th,td{
		border: 1px solid gray;
	}
	th{
		padding: 5px;
		background-color: blue;
		color: white;
	}
</style>
<script type="text/javascript">
	function search1(){
		location.href='/chapter19_search/Controller?cmd=allList'; //post방식은 안된다
	}
	// index -> servlet(controller) : allList 요청(호출) -> Service(인터페이스) -> ServiceImpl(구현 클래스) -> Dao(인터페이스) -> DaoImpl(구현 클래스) -> Mapper
	function search2(){
		location.href='/chapter19_search/Controller?cmd=inputDept';
	}
	function search3(){
		location.href='/chapter19_search/Controller?cmd=inputdynamic';
	}

</script>
</head>
<body>
	<div>
		<h1>원하는 검색 버튼 클릭</h1>
		<form>
			<table>
				<tr>
					<th>검색 버튼을 클릭하세요.</th>
				</tr>
				<tr>
					<td>
						<input type="button" value="전체 직원 보기" onclick="search1()">
						<input type="button" value="부서별 검색" onclick="search2()">
						<input type="button" value="동적 검색" onclick="search3()">
			</table>
		</form>
	</div>
</body>
</html>

'JSP > SEARCH' 카테고리의 다른 글

input_dynamic  (0) 2023.06.12
input_dept  (0) 2023.06.12
dynamic  (0) 2023.06.12
daptList  (0) 2023.06.12
allList  (0) 2023.06.12