숫자를 입력하세요.


+

 
"> ex03

숫자를 입력하세요.


+

 
"> ex03

숫자를 입력하세요.


+

 
">
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ex03</title>
<style type="text/css">
input[type=text]{
	width: 100px;
	height: 24px;
	font-size: 22px;
}
</style>
</head>
<body>
	<h1>숫자를 입력하세요.</h1>
	<br/>
	<form action="ex03Pro.jsp" method="get">
		<input type="text" name="v1"> + <input type="text" name="v2">
		<br/><br/>
		<input type="submit" value="완료"> &nbsp; <input type="reset" value="취소">
	</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
int data1 = Integer.parseInt(request.getParameter("v1"));
int data2 = Integer.parseInt(request.getParameter("v2"));

%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ex03Pro</title>
<style type="text/css">
p {
	font-size: 24px;
}
</style>
</head>
<body>
	<h1>계산 결과</h1>
	<br/>
	<p><%=data1 %> + <%=data2 %> = <%= data1 + data2 %></p>
</body>
</html>