Date & Time

Made By
Arsalan Aslam
Webmaster of
Code Master

Script Executed on

Current Time

View the source of this file. Everything is entirely done using VBScript

HTML
Comment
VBScript


<html>

<head>

<title>Date And Time</title>

<SCRIPT LANGUAGE=vbscript>

Sub ShowTime

'Show time in the 2nd textbox

txttime.value=Time()

'Execute the ShowTime function
'every second
'The settimeout function just execute
'the specified function or expression when the given
'interval elapses
'Syntax
'settimeout(NameOfTheFucntion,Milisecond)
'where NameOfTheFucntion must be enlosed
'with double quotes.

settimeout "ShowTime",1000

End Sub

Sub window_onload

'Show date to 1st textbox

txtdate.value=date()

'Execute this function first time
'so it fills the textbox

ShowTime

End Sub

</SCRIPT>

</head>

<body>

<p align="center"><u><b>Date &amp; Time</b></u></p>

<p align="center"><font size="2">Made By<br>

Arsalan Aslam<br>

Webmaster of </font><a href="http://www.geocities.com/coding1984"><font size="2">Code

Master</font></a></p>

<p align="center">Script Executed on<br>

<input type="text" name="txtdate" size="16" style="background-color: #000000; color: #FFFFFF; font-weight: bold; text-align: Center; border-style: outset"></p>

<p align="center">Current Time <br>

<input type="text" name="txttime" size="16" style="background-color: #000000; color: #FFFFFF; font-weight: bold; text-align: Center; border-style: outset"></p>

<p align="center">View the source of this file. Everything is entirely done

using VBScript</p>

<hr>

<hr>

</body>

</html>