@ -17,8 +17,8 @@
<button onclick="rotate()">Tourner</button>
<h1 id="winner"></h1>
<form name="myForm" action="/action_page.php" onsubmit="return validateForm()" method="post">
Ajouter quelqu'un: <input type="text" name="fname">
Ajouter quelqu'un: <input id="entry" type="text" name="fname">
<input type="submit" value="Submit">
<input id="submit" type="submit" value="Submit">
</form>
</body>
</html>
@ -75,3 +75,9 @@ function validateForm() {
names.push(x);
draw_roulette(200,200,200, names);
}
document.getElementById('submit').addEventListener('click', function(event){
event.preventDefault();
names.push(document.getElementById("entry").innerText);
draw_roulette(200, 200, 200, names);
})