Time dateTime Property - Change the date and time of a <time> element: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Time

Description

Time dateTime Property - Change the date and time of a <time> element:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

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

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

<script>
function myFunction() {/*  w w w .j  a v  a 2s . co m*/
    document.getElementById("myTime").dateTime = "1999-06-24T09:30Z";
    document.getElementById("demo").innerHTML = "changed";
}
</script>

</body>
</html>

Related Tutorials