0

How to create login to display in table score ? (Java script)

<script> var credit = 20; var symboles = ['&clubs;', '&#9829;', '&#9824;', '&#9830;'] jQuery(function(){ $('input[type="button"]').click(function(){ var $t = $(this); $t.hide(); if(credit < 1) { alert("No more Credit"); return false; } $(".img").hide(); var $check = 0; var $last = -1; //////// function getValue(){ var retVal = prompt("Votre Nom : ", "Saisir Votre Nom"); document.write("Vous etes : " + retVal); } $(".img").each(function(k,v){ var x = Math.floor((Math.random() * 3)); if($last == -1) { $last = x; } if($last!=x) { $check = 1; } $(this).html(symboles[x]); $(this).delay( 500 ).fadeIn( 300 ); }); if($check==0) { credit +=5; } else { --credit; } $(".score").html(credit); setTimeout(function(){$t.show();},500) }) $(".score").html(credit); }) This is my web jackpot simple. I want create form with js for asking name and display his name to table score. How i can do ? Tks a lot

18th Apr 2017, 8:35 AM
Olioty
Olioty - avatar
6 Respostas
+ 2
put on Code Playground please
18th Apr 2017, 8:44 AM
Calviղ
Calviղ - avatar
18th Apr 2017, 11:22 AM
Calviղ
Calviղ - avatar
+ 1
Sorry, dont get what you mean?
18th Apr 2017, 8:51 AM
Calviղ
Calviղ - avatar
0
I'm done
18th Apr 2017, 8:46 AM
Olioty
Olioty - avatar
0
Okey. My question is How to create a function when client enter my web it will asking his name. After asking he will play my jackpot. And it will display his score on table score
18th Apr 2017, 8:56 AM
Olioty
Olioty - avatar
0
how can do it display on my scoreboar ? it difficule
19th Apr 2017, 10:15 AM
Olioty
Olioty - avatar