del cite Property - Change the value of the cite attribute: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Del

Description

del cite Property - Change the value of the cite attribute:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p><del id="myDel" cite="why_deleted.htm">This text has been deleted</del></p>

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

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

<script>
function myFunction() {/* www  .j a  v  a2s. c  om*/
    document.getElementById("myDel").cite = "http://www.example.com/";
    document.getElementById("demo").innerHTML = "changed to www.example.com/";
}
</script>

</body>
</html>

Related Tutorials