Writing to The HTML Document
The example below writes a <p> element with current date information to the HTML document
Example
<html>
<body>
<h1>My First Web Page</h1>
<script type="text/javascript">
document.write("<p>" + Date() + "</p>");
</script>
</body>
</html>
your result
My First Web Page
Wed Feb 23 01:43:56 2011
The example below writes a <p> element with current date information to the HTML document
Example
<html>
<body>
<h1>My First Web Page</h1>
<script type="text/javascript">
document.write("<p>" + Date() + "</p>");
</script>
</body>
</html>
your result
My First Web Page
Wed Feb 23 01:43:56 2011