New to JavaScript and HTML. I'm trying to change the background color in my HTML code through JavaScript.
The only thing that I need to happen is to change the background color on divMain
below from black to white using only JavaScript and keeping the HTML code the same
<style>
#divMain {
position:absolute;
left:0px;
top:0px;
width:320px;
height:460px;
background-color:black;
-webkit-user-select:none;
-webkit-text-size-adjust:none;
}
</style>
</head>
<body
onload="body_load();"
>
<div
id="divMain">
</div>
The only things that I have in the JavaScript code is this:
function body_load() {
}