Jump to content

Recommended Posts

Posted

Hi everyone,

I´ve been playing around with this script but dont get it right, what part do I delete to ONLY have the date showing and not "Todays date is".

 

[<script LANGUAGE=javascript"><!--

 

// ***********************************************

// AUTHOR: WWW.CGISCRIPT.NET, LLC

// URL: http://www.cgiscript.net

// Use the script, just leave this message intact.

// Download your FREE CGI/Perl Scripts today!

// ( http://www.cgiscript.net/scripts.htm )

// ***********************************************

 

// Get today's current date.

var now = new Date();

 

// Array list of days.

var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

 

// Array list of months.

var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

 

// Calculate the number of the current day in the week.

var date = ((now.getDate()

 

// Calculate four digit year.

function fourdigits(number) {

return (number

}

 

// Join it all together

today = days[now.getDay()] + ", " +

months[now.getMonth()] + " " +

date + ", " +

(fourdigits(now.getYear())) ;

 

// Print out the data.

document.write("Today\'s date is

" +today+ ".");

 

//-->]

 

I took away this part (it wasnt correct):

Today\'s date is

 

 

-Thomas :)

Posted
document.write("<b>Today\'s date is</b><br> " +today+ ".");

change the above to....

>document.write(today);

That should do it.

 

*edit* which if I was actually reading and not just replying, I would have noticed that Wilexa had said this. So... do what Wilexa said. :blink:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...