-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path2.php
More file actions
41 lines (32 loc) · 1.13 KB
/
2.php
File metadata and controls
41 lines (32 loc) · 1.13 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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>第二步</title>
</head>
<script type="text/javascript">
function check(){
var fm=document.getElementsByTagName('form')[0];
var fd=new FormData(fm);
var xhr=new XMLHttpRequest();
xhr.onreadystatechange=function(){
if(xhr.readyState==4){
document.getElementById('notice').innerHTML=xhr.responseText;
}
}
xhr.open("post","./queryroom.php");
xhr.send(fd);
return false;
}
</script>
<body>
<center>
<span style="font: sans-serif;font-size: 85px;">输入你创建聊天室的房间名</span><br/><br/><br/><br/><br/><br/><br/><br/>
<form action="./createchat.php" method="post">
<input style="height: 50px;" type="text" name="chatroom" />
<input style="height: 50px;width: 60px;"type="submit" value="创建" />
<div id="notice"></div>
</form>
<button onclick="check()" style="height: 50px;width: 200px;">检查你的房间名是否合法</button>
</center>
</body>
</html>