1 // change background color for specific id ..
2function changebackground(){
3 document.getElementById('id').style.backgroundColor = 'green' ;
4}
5// change background color for whole body..
6function changebackground(){
7 document.body.style.backgroundColor = 'green';
8}
9
1function changeBackground(color) {
2 document.body.style.background = color;
3}
4
5window.addEventListener("load",function() { changeBackground('red') });
1var warning = document.getElementById("warning");
2 warning.style.background-color = "red";
3
4