본문 바로가기
JSP

221130 HTML 구구단 연습

<%@ 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>
</head>
<body>
	<hr>
	<h2>구구단</h2>
	<form>
		<table border="1">
			<tr>
				<%for(int k=2;k<=9;k++) {%>
				<td colspan="1" align="center"><%=k %>단
				</td>
				<%} %>
			</tr>
		
			<%for(int i=1;i<=9;i++){%>
			<tr>
				<%for(int j=2;j<=9;j++){ %>
				<td><%=j %>x<%=i %>=<%=i*j%> <%} %> <%}%></td>
			</tr>
		</table>
	</form>


</body>
</html>

'JSP' 카테고리의 다른 글

221130 jsp out  (0) 2022.11.30
221130 jsp태그 class와 id, style맛보기  (0) 2022.11.30
221130 response 2  (0) 2022.11.30
221130 JSP response redirect  (0) 2022.11.30
221130 request 실습 get방식 a태그  (0) 2022.11.30