<html> <head> <script type="text/javascript"> <!-- var name1 = window.prompt("Admin: input name1") var name11 = name1.substring(0,3) var name12 = name1.substring(0,4) var name13 = name1.substring(0,5) var name14 = name1.substring(0,6) var name15 = name1.substring(0,7) var name16 = name1.substring(0,8) var name17 = name1.substring(0,9) var name18 = name1.substring(0,10) var name19 = name1.substring(0,11) var name2 = window.prompt("Admin: input name2") function confirmation(){ var i1=0 var i2=0 var answer = window.prompt("Player: Which player do you vote for?") if (answer===name1 || answer===name11 || answer===name12 || answer===name13 || answer===name14 || answer===name15 || answer===name16 || answer===name17 || answer===name18 || answer===name19){var answer = confirm("are you sure?") if (answer){i1++ document.write(name1+" "+i1+"<p>"+name2+" "+i2)}} else if (answer===name2){var answer = confirm("are your sure?") if (answer){i2++ document.write(name1+" "+i1+"<p>"+name2+" "+i2)}} else {document.write("this player doesn't exist "+answer)} } --> </script> </head> <body> <form> <input type="button" onclick="confirmation()" value="vote"> </form> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)