HTML gevorderde |
|
Dit kan je dan veel beter met gewoon JavaScript doen:
if( document.addEventListener ) {
document.body.addEventListener('load', setBackground, false);
}
if( document.attachEvent ) {
document.body.attachEvent('onload', setBackground);
}
function setBackground() {
document.body.style.background = "url('path/naar/image.png')";
}
if( document.addEventListener ) { document.body.addEventListener('load', setBackground, false); } if( document.attachEvent ) { document.body.attachEvent('onload', setBackground); } function setBackground() { document.body.style.background = "url('path/naar/image.png')"; }
|