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

Javascript examples for DOM HTML Element:Ins

Description

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

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p>This is a text.
<ins id="myIns" datetime="2012-09-15T22:55:03Z">This is an inserted text.</ins>
</p>//from w w  w .j  a va  2 s . c  o  m

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

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

<script>
function myFunction() {
    document.getElementById("myIns").dateTime = "2013-11-15T21:40:07Z";
    document.getElementById("demo").innerHTML = "changed to '2013-11-15T21:40:07Z'.";
}
</script>

</body>
</html>

Related Tutorials