<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!-- Intro07.jsp -->
<!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>
<!-- 스파게티코드: 시작과 끝이 전부 html요소에 의해 분리되므로
어지러워서 스파게티코드라 부릅니다... -->
<table width="650" border="1">
<%
for (int i=1; i<=10; i++)
{
%>
<tr <% if (i%2==0) {%>bgcolor="yellow"<%} %>>
<td><%=i %>행</td>
</tr>
<%
}
%>
</table>
</body>
</html>
*.구구단 연습.
********** Intro08.jsp *************
<%@ 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>
<table border="1" width="650">
<%
for (int i=1; i<=9; i++)
{
%>
<tr <% if (i%2==0) {%>bgcolor="green"<%} %>>
<%
for (int j=1; j<=9; j++)
{
%>
<td><%=i %>X<%=j %>=<%=(i*j) %></td>
<%
}
%>
</tr>
<%
}
%>
</table>
</body>
</html>
pageEncoding="EUC-KR"%>
<!-- Intro07.jsp -->
<!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>
<!-- 스파게티코드: 시작과 끝이 전부 html요소에 의해 분리되므로
어지러워서 스파게티코드라 부릅니다... -->
<table width="650" border="1">
<%
for (int i=1; i<=10; i++)
{
%>
<tr <% if (i%2==0) {%>bgcolor="yellow"<%} %>>
<td><%=i %>행</td>
</tr>
<%
}
%>
</table>
</body>
</html>
*.구구단 연습.
********** Intro08.jsp *************
<%@ 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>
<table border="1" width="650">
<%
for (int i=1; i<=9; i++)
{
%>
<tr <% if (i%2==0) {%>bgcolor="green"<%} %>>
<%
for (int j=1; j<=9; j++)
{
%>
<td><%=i %>X<%=j %>=<%=(i*j) %></td>
<%
}
%>
</tr>
<%
}
%>
</table>
</body>
</html>