<script language="JavaScript">
<!-- Activate cloaking device
document.write('<body background="' + image + '" >')
// Deactivate cloaking device -->
</script>
I need to add this extra style on background.
no-repeat center center fixed
I tried and it doesn’t work:
document.write('<body background="' + image + '" no-repeat center center fixed>')
How do I add this style to background?
Wow, that is some old piece of script. Comments around script hasn’t been needed for very long, and the
languageattribute is replaced by thetypeattribute.You have to use a CSS style instead of the
backgroundattribute to add those CSS settings to the style:Writing out the body tag using script may have bad effects on how your page is viewed by search engines. It would be better to create the body element as usual and set the style on it afterwards: