Solution for "change element background color DOM"

function changeBackground(color) { document.body.style.background = color; } window.addEventListener("load",function() { changeBackground('red') });

javascript change background color

var warning = document.getElementById("warning"); warning.style.background-color = "red";

how to change background color using js

Similar codes for "change element background color DOM"


Latest 'Javascript' questions

Added before "change element background color DOM"