I’d been able to change font colors, borders and the like, but changing the background image seemed to prove a bit more difficult. Here are a few examples of what I tried to do and that didn’t work: document.getElementById('element_id').style.
I am trying to change the background image of a div after a period of time automatically using JavaScript (however is the first time that I have used JS). Nothing in the JavaScript code works; none of those images appear and nothing swaps.
The backgroundImage property sets or returns the background image of an element. Tip: In addition to the background-image you should also specify a background-color. The background-color will be used if the image is unavailable.
Post a Comment:
Showing 0 Comments: