I want to fetch the background-image from this css how can i do it?
<div class="zoomWindow" style="overflow: hidden; background-position: -174.967px -146.847px; text-align: center; background-color: rgb(255, 255, 255); width: 700px; height: 450px; float: left; background-size: 1100px 1500px; z-index: 100; border: 0px solid rgb(136, 136, 136); background-repeat: no-repeat; position: absolute; background-image: url("http://cdn.shopclues.com/images/detailed/45044/UX8A34631_1475562297.jpg"); top: 200.4px; left: 623.5px; display: none;"> </div>
my code open the new tab with url of background image BUT the domain name is still there i dont know why
Here is my code
var img = document.getElementsByClassName('zoomWindow');
console.log(img[0].style.backgroundImage.slice(4, -1));
var imagers =img[0].style.backgroundImage.slice(11, -2);
window.open(imagers);