-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathbottom.jsp
More file actions
123 lines (113 loc) · 4.36 KB
/
bottom.jsp
File metadata and controls
123 lines (113 loc) · 4.36 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My JSP 'bottom.jsp' starting page</title>
<base href="${basePath}">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="styles.css">
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function () {
document.getElementById("sendButton").addEventListener("click", function () {
const message = document.forms['formms']['message'].value;
const avatar = document.forms['formms']['touxiang'].value;
if (!message && !avatar) {
alert("不能发送空消息!");
return false;
}
document.forms['formms']['mess'].value = message;
document.forms['formms']['message'].value = "";
return true;
});
document.querySelectorAll("input[name='touxiang']").forEach(radio => {
radio.addEventListener("click", function () {
document.getElementById("small").style.zIndex = 1;
});
});
document.getElementById("smallImg").addEventListener("click", function () {
document.getElementById("small").style.zIndex = 3;
});
});
function resetRadio() {
document.querySelectorAll("input[name='radiobutton']").forEach(radio => radio.checked = false);
}
</script>
<style>
body {
font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
height: 100%;
background-size: cover;
color: #000;
position: relative;
}
.login {
padding: 2px 15px;
font-size: 15px;
color: rgb(0, 100, 233);
transition: background 250ms ease-in, color 250ms ease-in;
border-radius: 6px;
text-decoration: none;
}
.login:hover {
color: #fff;
background: #BBD631;
}
.doc {
display: inline-block;
}
.doc:hover {
border: 1px;
}
#small {
position: absolute;
z-index: 1;
}
#send {
position: absolute;
z-index: 2;
}
</style>
</head>
<body>
<form action="left.jsp" target="left" method="post" name="formms">
字体颜色:
<select name="textColor">
<option value="black">黑色</option>
<option value="red">红色</option>
<option value="green">绿色</option>
<option value="blue">蓝色</option>
</select>
文件管理:
<a class="doc" href="document.jsp" target="_blank">
<img alt="文件管理" title="文件上传下载" src="images/documentMessage.png">
</a>
选择表情:
<img id="smallImg" alt="表情" title="发送表情" src="images/small1.png">
<div id="small" name="small">
<input type="radio" name="touxiang" value="images/f01.gif">
<img src="images/f01.gif">
<input type="radio" name="touxiang" value="images/f02.gif">
<img src="images/f02.gif">
<input type="radio" name="touxiang" value="images/f03.gif">
<img src="images/f03.gif">
<input type="radio" name="touxiang" value="images/f04.gif">
<img src="images/f04.gif">
</div>
<div id="send">
<input type="text" name="message" style="width: 300px; height: 30px;">
<input type="submit" id="sendButton" value="发送" class="login">
<input type="hidden" name="mess">
</div>
</form>
</body>
</html>