forked from himaniagarwal04/spin-wheel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
107 lines (82 loc) · 3.21 KB
/
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
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
<html><head>
<title>Spin Wheel</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<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:wght@300;400&display=swap" rel="stylesheet">
<head></head>
<body>
<h1><center> Who should be the team leader?</center><br>
<div id="mainbox" class="mainbox">
<div id="box" class="box">
<div class="box1">
<span class="span1"><b><p id="name1"></p> </array></b></span>
<span class="span2"><b><p id="name2"></p> </b></span>
<span class="span3"><b><p id="name3"></p> </b></span>
<span class="span4"><b><p id="name4"></p> </b></span>
</div>
<div class="box2">
<span class="span1"><b><p id="name5"></p> </b></span>
<span class="span2"><b><p id="name6"></p> </b></span>
<span class="span3"><b><p id="name7"></p> </b></span>
<span class="span4"><b><p id="name8"></p> </b></span>
</div>
</div>
<button class="spin" onclick="myfunction()">SPIN</button>
</div>
//<script>
//window.onload = function(){
//var name = prompt("What's your name?");
//document.getElementById('output').innerHTML = name;
//const cars = ["Saab", "Volvo", "BMW"];
//let car = cars[0];
//document.getElementById('output').innerHTML = car;
</script>
<script>
window.onload = function(){
var name1 = prompt("Enter the first name");
document.getElementById('name1').innerHTML = name1;
var name2 = prompt("Enter the second name");
document.getElementById('name2').innerHTML = name2;
var name3 = prompt("Enter the third name");
document.getElementById('name3').innerHTML = name3;
var name4 = prompt("Enter the fourth name");
document.getElementById('name4').innerHTML = name4;
var name5 = prompt("Enter the fifth name");
document.getElementById('name5').innerHTML = name5;
var name6 = prompt("Enter the sixth name");
document.getElementById('name6').innerHTML = name6;
var name7 = prompt("Enter the seventh name");
document.getElementById('name7').innerHTML = name7;
var name8 = prompt("Enter the eigth name");
document.getElementById('name8').innerHTML = name8;
};
</script>
<! --<input type="text" id="text1"></input>
<input type="button" id="button1" value="Add" onclick="add_element_to_array();"></input>
<input type="button" id="button2" value="Display" onclick="display_array();"></input>
<div id="Result"></div>
<script type="text/javascript">
var x = 0;
var array = Array();
function add_element_to_array()
{
array[x] = document.getElementById("text1").value;
alert("Element: " + array[x] + " Added at index " + x);
x++;
document.getElementById("text1").value = "";
}
function display_array()
{
var e = "<hr/>";
for (var y=0; y<array.length; y++)
{
e += "Element " + y + " = " + array[y] + "<br/>";
}
document.getElementById("Result").innerHTML = e;
}-->
</script>
<script src="script.js"></script>
</body>
</html>