-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreateclass.html
191 lines (170 loc) · 4.34 KB
/
createclass.html
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>创建班级</title>
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="css/mui.min.css">
<!--App自定义的css-->
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script src="js/mui.min.js"></script>
<script src="js/tool.js"></script>
<style>
.area {
margin: 20px auto 0px auto;
}
.mui-input-group {
margin-top: 10px;
}
.mui-input-group:first-child {
margin-top: 20px;
}
.mui-input-group label {
width: 22%;
}
.mui-input-row label~input,
.mui-input-row label~select,
.mui-input-row label~textarea {
width: 78%;
}
.mui-checkbox input[type=checkbox],
.mui-radio input[type=radio] {
top: 6px;
}
.mui-content-padded {
margin-top: 25px;
}
.mui-btn {
padding: 10px;
}
.link-area {
display: block;
margin-top: 25px;
text-align: center;
}
.spliter {
color: #bbb;
padding: 0px 8px;
}
.oauth-area {
position: absolute;
bottom: 20px;
left: 0px;
text-align: center;
width: 100%;
padding: 0px;
margin: 0px;
}
.oauth-area .oauth-btn {
display: inline-block;
width: 50px;
height: 50px;
background-size: 30px 30px;
background-position: center center;
background-repeat: no-repeat;
margin: 0px 20px;
/*-webkit-filter: grayscale(100%); */
border: solid 1px #ddd;
border-radius: 25px;
}
.oauth-area .oauth-btn:active {
border: solid 1px #aaa;
}
.oauth-area .oauth-btn.disabled {
background-color: #ddd;
}
body {
background-color: #EFEFF4;
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
.login_btn{
width:300px;
margin:30px auto 0 auto;
}
.login_btn button{
width:100%;
margin:0;
padding:.3em 0;
-webkit-border-radius:.3em;
-moz-border-radius: .3em;
border:#1263be solid 1px;
background-color: #29C4B5;
color:#FFF;
font-size:17px;
font-weight:bolder;
letter-spacing:1em;
}
.login_btn button:hover{
background-color: cadetblue;
}
.topper
{
background-color:#29c4b5;
font-size: 20px;
margin:0;
margin-bottom: 1%;
padding:6px;
text-align: center;
font-weight:bold;
color:#FFFFFF;
}
</style>
</head>
<body>
<header class="mui-bar mui-bar-nav">
<a class="mui-icon mui-icon-arrowleft " href="t_banji.html"></a>
<h1 class="mui-title">创建班级</h1>
</header>
<div class="mui-content">
<form id='login-form' class="mui-input-group">
<div class="mui-input-row">
<label>班级</label>
<input id='account' type="text" class="mui-input-clear mui-input" placeholder="请输入班级名称">
</div>
</form>
<div class="mui-content-padded">
<div class="login_btn">
<button id='login' class="mui-btn mui-btn-block mui-btn-primary">创建</button>
</div>
</div>
<div class="mui-content-padded oauth-area">
</div>
</div>
</body>
<script>
$(document).ready(function (){
//var url=127.0.0.1:8080;
// var url='210.36.22.231';
mui.toast("正在创建班级...");
var classname=document.getElementById("account");
var add = document.getElementById('login');
add.onclick = function() {
mui.ajax('http://'+url+'/jizhibackend/servlet/SendJoinRequest',{
data:
{
classname:classname.value
},
xhrFields: {
withCredentials: true
},
crossDomain: true,
dataType: 'test', //服务器返回json格式数据
type: 'post', //HTTP请求类型
timeout: 10000, //超时时间设置为10秒;
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' },
success: function(data) {
mui.toast("创建班级成功")
},
error: function(xhr, type, errorThrown) {
console.log(errorThrown);
}
});
}
});
</script>
</html>