codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:



Displaying the Date in the Status Bar



This script uses the various parts of the Javascript Date object to build up today's date and display it in the status bar.

First place the following code in the <head> section of the page.

<script language="javascript">

function showdate()
{
   var d= new Date();
   var y=d.getYear();
   var m=d.getMonth() +1;
   var day=d.getDate();
   var t=m+'/'+d+'/'+y+' ';
   statusLine="The date today is " + t + ".";}

</script>


Next call the function from the <body> tag using the onLoad Event Handler :

<body onLoad="showdate()">













Recent Forum Threads
• Re: Insert Contents of .txt file into a .html page
• Re: Perl regular expression problem.
• Re: Problems in login using WWW::Mechanize
• searching for gd::graph guide
• Re: ARRAY OF HASHMAPS
• Adv. Regexp or Otherwise
• Adv. Regexp or Otherwise
• I need help pleasee! My project is about using I/o Stream
• Help Running VB script in Windows 2003


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2008