How could I generate a random number every refresh using html and javascript?
I have the javascript that would generate a decimal number.
function DecimalGenerate() {
var min = 1.03,
max = 5.99,
NumberResult = Math.random() * (max - min) + min;
alert(parseFloat(NumberResult).toFixed( 2 ));
};
DecimalGenerate();
Aucun commentaire:
Enregistrer un commentaire