Try this:
var img = document.getElementById('widgetField'),
style = img.currentStyle || window.getComputedStyle(img, false),
bi = style.backgroundImage.slice(4, -1);
More Related Contents:
- 5 stars and the golden 5 stars are not together (When browsing with Internet explorer)
- How to hide css and js version details from weppalyzer in PHP
- How to make page loaders/animations/transitions
- Replacing css file on the fly (and apply the new style to the page)
- How to autosize a textarea using Prototype?
- Textarea Auto height [duplicate]
- How to change CSS property using JavaScript
- Relative Paths in Javascript in an external file
- Dynamically loading css stylesheet doesn’t work on IE
- How to silently hide “Image not found” icon when src source image is not found
- Setting CSS value limits of the window scrolling animation
- HTML – how can I show tooltip ONLY when ellipsis is activated
- HTML Table with vertical rows
- Resize a div on border drag and drop without adding extra markup
- How to draw polygons on an HTML5 canvas?
- Using querySelectorAll to change the style property of multiple elements
- Convert TD columns into TR rows
- show loading icon until the page is load?
- How to use square cursor in a HTML input field?
- What is the difference between window.innerWidth and screen.width?
- jQuery: Slide left and slide right
- Adding a new line in a JSX string inside a paragraph – React
- CSS: Two column Div layout misaligns when Zoom changes
- Adding Google Translate to a web site
- Specify parent divs opacity but make it not affect children HTML elements
- How to override css prefers-color-scheme setting
- Enable/disable a button in pure javascript
- How to increase width of underline for the multiline text when on hover
- Browsers automatically evaluate hex or hsl colors to rgb when setting via element.style.background?
- How to get a leaflet map canvas to have a 100% height?