+ 1
How can I add the function Math.floor when I click the button?
3 RĂ©ponses
+ 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...