-
Notifications
You must be signed in to change notification settings - Fork 0
/
join.html
67 lines (65 loc) · 1.98 KB
/
join.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body{
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: rgb(41, 41, 41);
color: white;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: larger;
}
input{
padding: 5px 0px 5px 0;
font-size: 40px;
width: 220px;
text-align: center;
border-radius: 5px;
}
button{
padding: 12px 40px;
margin: 15px;
font-weight: bolder;
border-radius: 5px;
cursor: pointer;
}
#errTxt{
color: red;
font-size: 20px;
display: none;
}
</style>
<title></title>
</head>
<body>
<div style="text-align: center;">
<div id="myID">Your ID: </div><br>
<form action="index.html">
<input name="name" required placeholder="Your Name">
<input name="r" required type="text" maxlength="4" placeholder="Room No."><br>
<button type="submit">Join</button><br>
</form>
<span>Or</span>
<form action="index.html">
<input type="text" name="name" required placeholder="Your Name">
<button type="submit">Create Room</button>
</form>
<div id="errTxt">Room Not Found</div>
</div>
<script>
document.getElementById("myID").innerHTML = "My room No.: " + localStorage.getItem("roomNum")
let errTxt = document.getElementById("errTxt")
let url = new URL(window.location.href)
let room = url.searchParams.get("e")
if(room == "nf"){
errTxt.style.display = "block"
}
</script>
</body>
</html>