-
Notifications
You must be signed in to change notification settings - Fork 0
/
Create-Room.html
91 lines (90 loc) · 3.03 KB
/
Create-Room.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
<!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">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@1,700&family=Licorice&family=Ole&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/styling.css">
<title>Create A Room</title>
</head>
<body>
<div class="heading">
<img class="reel" src="css/reel.webp">
<h1>DUMB CHARADES</h1>
<img class="game-time" src="css/game-time.gif">
</div>
<div class="rounds">
<label for="round">Number of Rounds</label> 
<select id="round" name="round">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
</div>
<div class="movies">
<label for="movie">Type of Movie name</label> 
<select id="movie" name="movie">
<option value="hindi">Hindi</option>
<option value="english">English</option>
<option value="telegu">Telegu</option>
<option value="tamil">Tamil</option>
<option value="gujrati">Gujrati</option>
<option value="marathi">Marathi</option>
</select>
</div>
<div class="room-code">
<form action="chat.html">
<div class="form-control">
<label for="username"><strong>Enter your name</strong></label> 
<input
class="enter-room-code"
type="text"
name="username"
id="username"
placeholder="Enter username..."
required
/>
<br>
</div>
<div class="form-control">
<label for="room"><strong>Enter Room Code</strong></label> 
<input
class="enter-room-code"
type="text"
name="room"
id="room"
placeholder="Generating room code..."
required
/>
<button onclick="GetRandom()" type="button">Generate</button>
<br>
</div>
<button type="submit" class="join-btn">Join Room</button>
</form>
</div>
<script>
function makeid(length) {
var result = '';
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var charactersLength = characters.length;
for ( var i = 0; i < length; i++ ) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}
function GetRandom() {
var myElement = document.getElementById("room");
myElement.value = makeid(10);
}
</script>
</body>
</html>