|
@ -7,14 +7,10 @@ |
|
|
<script type="text/javascript" src="script.js"></script> |
|
|
<script type="text/javascript" src="script.js"></script> |
|
|
</head> |
|
|
</head> |
|
|
<body> |
|
|
<body> |
|
|
<svg id="roulette" width="800" height="800"> |
|
|
<svg id="roulette" width="420" height="420"> |
|
|
<g stroke="black" stroke-width=2></g> |
|
|
<g stroke="black" stroke-width=2></g> |
|
|
</svg> |
|
|
</svg> |
|
|
<script type="text/javascript"> |
|
|
<button onclick="rotate()" style="display: block;">Tourner</button> |
|
|
let names = new Array(); |
|
|
|
|
|
draw_roulette(200, 200, 200, names); |
|
|
|
|
|
</script> |
|
|
|
|
|
<button onclick="rotate()">Tourner</button> |
|
|
|
|
|
<h1 id="winner"></h1> |
|
|
<h1 id="winner"></h1> |
|
|
Ajouter quelqu'un: <input id="entry" type="text" name="fname"> |
|
|
Ajouter quelqu'un: <input id="entry" type="text" name="fname"> |
|
|
<input id="submit" type="submit" value="Submit"> |
|
|
<input id="submit" type="submit" value="Submit"> |
|
@ -22,10 +18,11 @@ |
|
|
|
|
|
|
|
|
</ul> |
|
|
</ul> |
|
|
<script> |
|
|
<script> |
|
|
|
|
|
let names = new Array(); |
|
|
document.getElementById('submit').addEventListener('click', function(event){ |
|
|
document.getElementById('submit').addEventListener('click', function(event){ |
|
|
event.preventDefault(); |
|
|
event.preventDefault(); |
|
|
names.push(document.getElementById('entry').value); |
|
|
names.push(document.getElementById('entry').value); |
|
|
draw_roulette(200, 200, 200, names); |
|
|
draw_roulette(10, 10, 200, names); |
|
|
let new_element = document.createElement("li"); |
|
|
let new_element = document.createElement("li"); |
|
|
let remove_button = document.createElement('button'); |
|
|
let remove_button = document.createElement('button'); |
|
|
remove_button.innerText = "remove"; |
|
|
remove_button.innerText = "remove"; |
|
|