Hi,
I've been trying to change the background image of a layer using JS, but in vain. The code that I am using is as follows:
There is no error generated, but the image does not show in the layer also. Where am I going wrong? Please help.Code:CSS <style> .bannerDiv {top: 5px; left: 2px; position: absolute;} </style> JavaScript function init() { document.getElementById('bannerDiv').style.backgroundImage = 'url("abc.jpg")'; } HTML <body onload="init()"> <div id="bannerDiv" class="bannerDiv"></div> </body>
Peace,
Shivboy






Bookmarks