[IT]/html css js

html.form

givemebro 2021. 4. 2. 11:00
반응형

html form은 클라이언트의 요청을 서버에게 전달하기 위해 사용하는 html tag이다. 요청을 전달하는 이벤트 처리하는 버튼은 submit이다.

 

<!--  action : 실해할 url method : 전달 방법-->
	<!--  action에 명시할 서블릿 url은 web-inf/web.xml의 url-pattern에 기록되어 있음 -->
	<!--  web.xml : DD(Deployment Descriptor) 배포 기술서 -->
	<form action="hello" method="get">
		<input type=submit " value="get방식 요청">
		<!-- HelloServlet의 doGet()메서드 실행 -->
	</form>
	<hr>
	<form action="hello" method="post">
		<input type=submit " value="post방식 요청">
		<!-- HelloServlet의 doGet()메서드 실행 -->
	</form>
반응형