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

Javascript examples for DOM HTML Element:Quote

Description

Quote cite Property - Change the URL of a quotation:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p><q id="myQuote" cite="http://java2s.com">test.</q>
</p>//from  ww  w  .ja  va 2s.c  om

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

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

<script>
function myFunction() {
    document.getElementById("myQuote").cite = "http://www.cnn.com";
    document.getElementById("demo").innerHTML = "changed";
}
</script>

</body>
</html>

Related Tutorials