0
Guys,I need some html,js code that click the button and alert random between 1-50 ,pls ya
2 odpowiedzi
+ 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>
0
Thnx I forget to told that I want .onclick event but really thnx :)