icu222much
Technical User
I am wondering how I would change the background colour of a document. The following is my approach, but it does not seem to work:
I found out that the proper way is:
I am wondering why my first approach did not work?
Code:
function changeBgColour() {
document.write("<body bgcolor=#00FF00>");
}
I found out that the proper way is:
Code:
function changeBgColour() {
document.bgColor = '#00FF00;
}
I am wondering why my first approach did not work?