Get Blockquote Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Blockquote

Introduction

The Blockquote object represents an HTML <blockquote> element.

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

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<blockquote id="myBlockquote" cite="http://www.java2s.com">
tutorial //from  www  . j  a va  2  s. c om
</blockquote>

<button onclick="myFunction()">Test</button>

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

<script>
function myFunction() {
    var x = document.getElementById("myBlockquote").cite;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials