Return the list-style-image property value: - Javascript CSS Style Property

Javascript examples for CSS Style Property:listStyleImage

Description

Return the list-style-image property value:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<ul id="myList" style="list-style-image:url('http://java2s.com/resources/c.png');">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Water</li>
  <li>Soda</li>
</ul>//from   ww w  .j  a v  a2 s .co m

<button type="button" onclick="myFunction()">Return list-item marker</button>

<script>
function myFunction() {
    console.log(document.getElementById("myList").style.listStyleImage);
}
</script>

</body>
</html>

Related Tutorials