Tuesday, February 5, 2013

Date() in Javascript

Display Date in a webpage using Javascript:

<!Doctype html>
<head>
<title>Basic_webpage</title>
<body>
<h1>Today Date</h1>
<br />
<script>
document.write(Date());
</script>
</body>
<head>
</html>

--------------------------------------------------------------

It will display results as 

Today Date


Tue Feb 05 2013 16:48:32 GMT+0530 (India Standard Time)


No comments:

Post a Comment