Javascript DOM CSS Style quotes Property get

Introduction

Return the quotes property:

alert(document.getElementById("myQ").style.quotes);

View in separate window

<!DOCTYPE html>
<html>
<body>

<p><q id="myQ" style="quotes:'\00ab' '\00bb';">This is a quote.</q></p>

<button type="button" onclick="myFunction()">Return quotation marks</button>
<p id="demo"></p>
<script>
function myFunction() {// www.  j  av a  2  s  .  co  m
  document.getElementById("demo").innerHTML = document.getElementById("myQ").style.quotes;
}
</script>

</body>
</html>



PreviousNext

Related