+ 1
How can I add the function Math.floor when I click the button?
3 Respuestas
+ 2
Call the function on button using onclick event.
BTW what is max here?
0
The proper way would be to give your button an id like <button id="button">, and then, in your <script>, at the bottom:
document.getElementById("button").addEventListener("click", function () {
// and here you can do whatever!
getRandomArbitrary();
alert("hello!");
});
0
User input is the “min” variable.Random number by game is “max” variable.So , when the user will click play after he input the number I want to output smth like “Your number is correct.You won”.But I can’t do this even with your answers...