Get Quote Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Quote


The Quote object represents an HTML <q> element.

You can access a <q> element by using getElementById():

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

<q id="myQuote" cite="">quote text</q>

<button onclick="myFunction()">get the URL of the quotation</button>

<p id="demo"></p>

function myFunction() {/*  www. ja  v  a 2  s  .c  o m*/
    var x = document.getElementById("myQuote").cite;
    document.getElementById("demo").innerHTML = x;


Related Tutorials