@adambraimbridge/

rock-paper-scissors-multiplayer

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • script.js
  • style.css
index.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
<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width">
	<title>repl.it</title>
	<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
	<div id="feedback" class="hidden"></div>
	<form id="form">
	
		<div id="username" class="hidden">
			<hr />
			<label for="username">Player one, please enter your name:</label>
			<input type="text" name="username" id="username-input"/>
		</div>
	
		<div id="user-choice" class="hidden">
			<span id="user-choice-feedback"></span> <label>Rock, paper or scissors?</label> <br />
			<label><input name="choice" id="choice-rock" value="rock" type="radio">Rock</input></label><br />
			<label><input name="choice" id="choice-paper" value="paper" type="radio">Paper</input></label><br />
			<label><input name="choice" id="choice-scissors" value="scissors" type="radio">Scissors</input></label>
		</div>

		<div id="username2" class="hidden">
			<hr />
			<label for="username2">Player two, please enter your name:</label>
			<input type="text" name="username2" id="username-input2"/>
		</div>
	
		<div id="user-choice2" class="hidden">
			<span id="user-choice-feedback2"></span> <label>Rock, paper or scissors?</label> <br />
			<label><input name="choice2" id="choice-rock2" value="rock" type="radio">Rock</input></label><br />
			<label><input name="choice2" id="choice-paper2" value="paper" type="radio">Paper</input></label><br />
			<label><input name="choice2" id="choice-scissors2" value="scissors" type="radio">Scissors</input></label>
		</div>

		<button type="submit" id="submit">Enter</button>
	</form>
	<div id="call-to-action" class="hidden"><a href="/">Play again</a></div>
	<script src="script.js"></script>
</body>
</html>
result
console