JSP 구구단예제

JAVA/JSP 2015. 8. 12. 14:37

<%@ page language="java" contentType="text/html; charset=EUC-KR"

pageEncoding="EUC-KR"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">

<title>Insert title here</title>

</head>

<body>

<h2 align="center">구구단</h2>

<hr>

<table align="center" border="1">

<tr>

<td></td>

<td>2</td>

<td>3</td>

<td>4</td>

<td>5</td>

<td>6</td>

<td>7</td>

<td>8</td>

<td>9</td>

</tr>

<%


for (int i = 1; i < 10; i++) {

%>

<tr>

<td><%=i%></td>

<%

for (int j = 2; j < 10; j++) {

%>



<td><%=j%>*<%=i%>=<%=(j * i)%></td>

<%

}

%>

</tr>

<%

}

%>




</table>


</body>

</html>

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

JSP 내장객체 request  (0) 2015.08.13
JSP Page 디렉티브에서 버퍼 설정(buffer속성과 autoFlush속성)  (0) 2015.08.12
JSP Forward,Param  (0) 2015.08.12
JSP 액션 Include,param  (0) 2015.08.12
JSP include 지시어  (0) 2015.08.12
블로그 이미지

왕왕왕왕

,