Blockquote cite Property - Change the URL of a quotation: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Blockquote

Description

Blockquote cite Property - Change the URL of a quotation:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<blockquote id="myBlockquote" cite="http://www.java2s.com">
quote//from   w  w w  .j a  va 2  s. c o  m
</blockquote>

<button onclick="myFunction()">change the value of the cite attribute of the quotation above</button>

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

<script>
function myFunction() {
    document.getElementById("myBlockquote").cite = "http://www.java2s.com/index.htm";
    document.getElementById("demo").innerHTML = "cite attribute changed";
}
</script>

</body>
</html>

Related Tutorials