자바과정/JSP
JSP 구구단 (자바코드)
Parkej
2021. 3. 8. 17:12
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
<link rel="stylesheet" href="bootst/css/bootstrap.css">
</head>
<body>
<table name = "tb" class="table table-striped">
<tr>
<td></td>
<%
for(int i=2;i<=9;i++){
%><td><%=i %>단</td>
<% } %>
</tr>
<%
for(int i=1;i<=9;i++){
%>
<tr>
<td><%=i %></td>
<%
for(int j=2;j<10;j++){
%><td><%=j %>*<%=i %>=<%=j*i %></td><%
} %>
<% } %>
</tr>
</table>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="bootst/js/bootstrap.js"></script>
</body>
</html>
* 부트스트랩 다운 사이트
https://getbootstrap.com/docs/4.4/getting-started/download/
* 부트스트랩 적용법
https://codevang.tistory.com/222
- 제이쿼리 라이브러리를 추가해야함. 요건 자바스크립트로 만들어진 라이브러리
- 붙스트랩은 내부적으로 제이쿼리 라이브러리를 사용하기 떄문임
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
(js를 선언한거보다 위에 있어야함.)
위에서 적용한 코드보다 위에 있어야 합니다.
라이브러리가 먼저 로드돼야 스크립트를 해석할 수 있기 때문입니다.
JVM에서 JRE의 라이브러리를 미리 로드하고 그 다음에 우리가 작성한
코드를 로드하는 것과 동일합니다.
반응형