Friday, March 11, 2011

How to get current date in Javascript

Here is simple program that will show you how to get current system date in Javascript and display
on the page.
this the function which used to get the current date in the javascript.
<script type="text/javascript">
function displayDate()
<h1>My First Web Page</h1>
<p id="demo">This is a paragraph.</p>
<button type="button" onclick="displayDate()">Display Date</button>

No comments :

Post a Comment