I want to create a function that generates a random number from 1 to a million. and put it on the form
"You have won [random value] points. Congratulations."
and somehow save it in the variable "x", which I can call in the text box, so in the text box a value that:
<input class="textbox1" type="text" readonly value="[X]">
<p> [X] </p>
<a href="mywebsite" data-text="[X]"></a>
So I can use it in different places, how can I do it?
source
share