samedi 27 février 2021

Using JavaScript to randomly select variables that format the webpage (background color, etc.) [closed]

Sorry, this question is a bit different. I want the webpage formatting to be randomly assigned.

So something like this: $color1 = {document.body.style.backgroundColor = "#AA0000"}. I'd do this for five different colors, etc.

Then, JavaScript could randomly choose which format (color) to implement.

I'm a real beginner. Sorry. I hope to learn a lot from the replies.




Aucun commentaire:

Enregistrer un commentaire