第二次提交:2022:06:14

master
Yossi 2 years ago
parent 575c544659
commit a7f413393d

@ -74,6 +74,21 @@
</div>
</div>
<div class="box">
<div class="left">
Simplicity is prerequisite for reliability.
<span class="sendTime">---2022年06月14日 14:21:56</span>
</div>
<div class="center">
<span class="guestName">
Edsger-Dijkstra
</span>
</div>
<div class="right">
<span class="sendTime"></span>
</div>
</div>
@ -195,7 +210,8 @@
url: "GuestMessageServlet",
type: "post",
dataType: "text",
data: {"method":"load"},
// data: {method:"load",messageNum:$(".box").length.toString()},
data: {method:"load"},
success: function (result) {
if(result!=null){
// alert("得到服务器的数据为:"+result+"类型为"+typeof result);

@ -44,11 +44,16 @@ public class GuestMessageServlet extends HttpServlet {
req.setCharacterEncoding("UTF-8");
// 解决响应中文乱码
resp.setContentType("text/html; charset=UTF-8");
PrintWriter writer = resp.getWriter();
//为了防止刷新页面导致页面信息丢失
if ("load".equals(req.getParameter("method"))){
// /*设置现有留言个数*/
// System.out.println("method为"+req.getParameter("method"));
// System.out.println("messageNum为"+req.getParameter("messageNum"));
// Integer messageNum = new Integer(req.getParameter("messageNum"));
// System.out.println("载入页面,得到的messageNum为"+messageNum);
// GuestMessage.setMessageNum(messageNum);
if (guestMessageArrayList!=null){
//List转json字符串
String s = gson.toJson(guestMessageArrayList);

@ -470,7 +470,8 @@ color: #a4a4a4} /* unvisited link */
height: auto;
/* background-color: rgba(255,255,255,.5); */
border-radius: 15px;
color: rgb(167, 255, 243);
color: rgb(249, 81, 81);
font-size: 18px;
text-align: center;
padding: 10px;
}
@ -481,20 +482,20 @@ color: #a4a4a4} /* unvisited link */
float: right;
right: 0;
bottom: 0;
color: #1ec8e9;
color: #ffffff;
margin-top: 10px;
}
/* 页面范围内偶数的匹配元素 */
.box:nth-child(even) .left{
background-color: rgb(120, 120, 244);
background-color: rgb(43, 43, 44);
box-shadow: rgba(0, 0, 0,.3);
}
/* 页面范围内奇数的匹配元素 */
.box:nth-child(odd) .right{
background-color: rgb(120, 120, 244);
background-color: rgb(43, 43, 44);
box-shadow: rgba(0, 0, 0,.3);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 788 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 742 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 959 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 740 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

@ -74,6 +74,21 @@
</div>
</div>
<div class="box">
<div class="left">
Simplicity is prerequisite for reliability.
<span class="sendTime">---2022年06月14日 14:21:56</span>
</div>
<div class="center">
<span class="guestName">
Edsger-Dijkstra
</span>
</div>
<div class="right">
<span class="sendTime"></span>
</div>
</div>
@ -195,7 +210,8 @@
url: "GuestMessageServlet",
type: "post",
dataType: "text",
data: {"method":"load"},
// data: {method:"load",messageNum:$(".box").length.toString()},
data: {method:"load"},
success: function (result) {
if(result!=null){
// alert("得到服务器的数据为:"+result+"类型为"+typeof result);

Loading…
Cancel
Save