Skip to content
Advertisement

How to change background image with the help of querySelector

i just wonder how to set the background image of a div block after using the queryselector. Below is my test. But none of this work…….Pls help.

JavaScript

Advertisement

Answer

JavaScript

I fully tested that code and it works.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement