Go Around The Tech Corner…

JS Tip 3: How to display the date and time using JavaScript

Posted on: November 8, 2009


This is a very simple one. JavaScript has inbuilt functions that you just include in your code. See the snippet below:

<html>
<title>Time & Date Display</title>
<head>
<script language = "JavaScript">
var today = new Date()
document.write(today);
</script>
</head>
<body>
Displaying Time Using JavaScript
</body>
</html>

That’s just about it. You declare a variable called today and assign it the Date() function. Then use document.write to display it on your webpage.

–          Millie

Advertisements

1 Response to "JS Tip 3: How to display the date and time using JavaScript"

At tt281.wordpress I show a similar idea but calling a function from xhtml.

TT281 blogger

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

Me – The author of this blog!


This is my tech blog. I got another blog, full of jokes that will crack u up! http://humoraddict.blogspot.com

Follow milliepatel84 on Twitter

Tweet Tweet…!!!!

  • I could stop raising hell....but I’m not a quitter 😛😛😛 18 hours ago
  • Heard NASA found traces of ice and salt on Mars....hope they are looking for the tequila now... 3 days ago
  • A good neighbor is one that does not put a password on their WiFi 5 days ago

Blog Stats

  • 44,560 hits

Top Clicks

  • None

Flickr Photos

Advertisements
%d bloggers like this: