Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
document.body.style.backgroundImage = "url('images/background52.jpg')";<br>
I tried in this way.but it is not working properly.
<br>
You are adding a html tag <br> in your javascript, see the console and you will see an error like
Uncaught SyntaxError: Unexpected token <
Get rid of <br> and it will work.
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
<br>after the semicolon? That should cause an error. Also, try hitting F12 and clicking on "Console" in your browser (assuming Chrome) to see if it displays any errors