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

Javascript examples for DOM HTML Element:Del

Description

del dateTime Property - Change the value of the datetime attribute:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p><del id="myDel" datetime="2011-11-15T22:55:03Z">This text has been deleted</del></p>

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

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

<script>
function myFunction() {//from  www .  j av a2  s .  co  m
    document.getElementById("myDel").dateTime = "2013-11-15T21:40:07Z";
    document.getElementById("demo").innerHTML = "changed to '2013-11-15T21:40:07Z'.";
}
</script>

</body>
</html>

Related Tutorials