+ 1
How can i randomize this change of background?
How can I change the background color randomly one after one with one click? https://code.sololearn.com/WpqAsmz7skZ5/?ref=app
2 Respostas
+ 5
here you have my edit
https://code.sololearn.com/WLv6bbOghk1j/?ref=app
+ 2
function getRandomColor() { var letters = '0123456789ABCDEF'; var color = '#'; for (var i = 0; i < 6; i++) { color += letters[Math.floor(Math.random() * 16)]; } return color; }
use this function
from stack over flow