User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 426,846 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,104 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting

Display client's PC Date & Time

Join Date: Sep 2005
Location: delhi
Posts: 1
Reputation: amitkr is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
amitkr amitkr is offline Offline
Newbie Poster

Re: Display client's PC Date & Time

  #4  
Sep 28th, 2005
<html>
<head>
<script language="JavaScript">
function showDate()
{
alert("Welcome to Java Script","");
var dt=new Date();
var dd=dt.getDate();
var mm=dt.getMonth()+1;
var yyyy=dt.getYear();
txtDate.value=dd+"/"+mm+"/"+yyyy
txtTime.value=dt.getHours() +":"+ dt.getMinutes()+":"+dt.getSeconds();
}
function close()
{
alert("Good Bye, Waiting to see you again","");
}
</script>
</head>
<body bgcolor="pink" onLoad="showDate();" onUnload="close();">
<center>
<font face="Arial" size=5 color="red">
<b> Current Date and Time </b>
</font>
<br> <br> <br> <br> <br> <br>
Current Date:
<input type=text name=txtDate value="">
<br>
Current Time:
<input type=text name=txtTime value="">
</center>
</body>
</html>
Reply With Quote  
All times are GMT -4. The time now is 9:29 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC