-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCuuChuongN.jsp
67 lines (51 loc) · 1.48 KB
/
CuuChuongN.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<title>CuuChuong</title>
<style>
#center{
padding-left: 200px;
display: flex;
}
</style>
</head>
<body>
<form action="CuuChuongN.jsp" method="post">
<div class="input-group" >
<span class="input-group-addon">Nhập N</span>
<input id="msg" type="number" class="form-control" style="width: 300px" name="txtn" placeholder="nhập N vào nhé">
</div>
<div id="center" >
<input name="xacnhan" type="submit" class="btn-2 btn-info" value="Xác Nhận">
</div>
<%
String tamnn=request.getParameter("txtn");
if(tamnn!=null) {
Long n=Long.parseLong(tamnn);
if(request.getParameter("xacnhan")!=null)
{
%>
<p align="center"> BẢNG CỬU CHƯƠNG <%=n %></p>
<table class="table" style="width:100px" align="center">
<% for ( int i = 1; i <=9 ;i++) {%>
<tr class="success">
<td>
<%=i%>x<%=n %>=<%=i*n %>
</td>
</tr>
<%} %>
</table>
<% } %>
<%
}
%>
<br>
</form>
</body>
</html>