I'm trying to get the background url of the image. below is the code from the webpage
<style type="text/css">
.great-banner.live-banner {
background-image:
url("urloftheimage");
}
</style>
<div class="great-banner live-banner">
</div>
I tried using
document.getElementsByClassName(".great-banner.live-banner").style.backgroundimage
window.getComputedStyle(document.getElementsByClassName(".great-banner.live-banner"),false); but both of these didn't work form me
I also tried
window.getComputedStyle(document.getElementsByClassName('.great-banner.live-banner')[0], null).getPropertyValue('background-image').split(/'|"/)[1]; and i'm getting the below error
Error: Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
Can you please help me how to get the background image URL