The example below writes the current date into an existing <p> element:
Example
<html>
<body>
<h1>My First Web Page</h1>
<p id="demo"></p>
<script type="text/javascript">
document.getElementById("demo").innerHTML=Date();
</script>
</body>
</html>


Posted in: 

0 Post Your questions:
Post a Comment