0

Guys,I need some html,js code that click the button and alert random between 1-50 ,pls ya

29th Aug 2016, 11:55 AM
DK-deadAnzle
DK-deadAnzle - avatar
2 Answers
+ 2
<button onclick="run()">Generate number</button> <p id="p"> </p> <script> function run() { //alert(Math.floor(Math.random()*50)+1); alert((Math.random()*50|0) +1); } </script>
29th Aug 2016, 1:35 PM
freshnewname
freshnewname - avatar
0
Thnx I forget to told that I want .onclick event but really thnx :)
30th Aug 2016, 7:02 AM
DK-deadAnzle
DK-deadAnzle - avatar
Hot today
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
AI
2 Votes
help
0 Votes
APIs
1 Votes