diff --git a/a.html b/a.html index 48afaa9..8579018 100644 --- a/a.html +++ b/a.html @@ -24,9 +24,9 @@

Color Flipper

- - - - + + + + \ No newline at end of file diff --git a/a.js b/a.js index e69de29..43573fc 100644 --- a/a.js +++ b/a.js @@ -0,0 +1,14 @@ +const body = document.getElementsByTagName("body")[0] + +function setColor(name) { + body.style.backgroundColor = name; +} + +function randomColor(){ + const red = Math.round(Math.random() * 255) + const green = Math.round(Math.random() * 255) + const blue = Math.round(Math.random() * 255) + const color = `rgb(${red},${green},${blue})` + + body.style.backgroundColor = color; +} \ No newline at end of file