-2

How do I find the background-image attribute of a DIV without the use of jQuery and only using Javascript?

Dachan
  • 157
  • 4
  • 16
  • possible duplicate of [Javascript: Get background-image URL of
    ](http://stackoverflow.com/questions/14013131/javascript-get-background-image-url-of-div) and http://stackoverflow.com/questions/19825927/get-just-the-url-from-background-image-property
    – j08691 Jan 21 '14 at 15:17
  • This is a very, *very* basic question which has featured in lots of already-answered questions. Please [search the site](http://stackoverflow.com/search) before asking questions in future. – James Donnelly Jan 21 '14 at 15:18

1 Answers1

1

Try this:

document.getElementById("element").style.backgroundImage;
Afzaal Ahmad Zeeshan
  • 15,669
  • 12
  • 55
  • 103