Get Del Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Del

Introduction

The Del object represents an HTML <del> element.

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

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p><del id="myDel" cite="http://java2s.com">deleted.</del></p>

<button onclick="myFunction()">get the URL of the del element</button>

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

<script>
function myFunction() {/* www . j  a v a2 s .  c  o  m*/
    var x = document.getElementById("myDel").cite;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials