Javascript examples for DOM HTML Element:Quote
The Quote object represents an HTML <q> element.
You can access a <q> element by using getElementById():
<!DOCTYPE html> <html> <body> <q id="myQuote" cite="http://www.java2s.com">quote text</q> <button onclick="myFunction()">get the URL of the quotation</button> <p id="demo"></p> <script> function myFunction() {/* www. ja v a 2 s .c o m*/ var x = document.getElementById("myQuote").cite; document.getElementById("demo").innerHTML = x; } </script> </body> </html>