Example:
Code:

<html>
<head>
<script type="text/javascript">
function displayDate()
{
document.getElementById("idname").innerHTML=Date();
}
</script>
</head>
<body>

<h1>The First  Page</h1>
<p id="idname">This is a first paragraph.</p>

<button type="button" onclick="displayDate()">Display Date</button>

</body>
</html> 





My First Page

This is a first paragraph.



eXTReMe Tracker