+ 1
Stopping the buttons from disappearing?
I made a button that writes a random number everytime you press it, but when the first number displays, the button disappears. How do I fix that? Edit: Here's the code. https://code.sololearn.com/WVb76c2I6PIY/?ref=app
2 Respuestas
+ 2
https://code.sololearn.com/W58S2Gwobt24/?ref=app
you use the document.write() function, it replaces the whole document with what you put inside the parentheses (these ones —> () <— ). So if you want to prevent that put the number in a specified place, a div. You can then replace the inner html with your number. (TIP use semicolumns; at the end of each line)
+ 1
Aren't you using document.write function?