5 replies [Last post]
rmcivo1
Offline
Enthusiast
Shropshire | Shrewsbury
Last seen: 9 years 2 weeks ago
Shropshire | Shrewsbury
Joined: 2003-12-05
Posts: 115
Points: 0

Head of my Page

<SCRIPT LANGUAGE="JavaScript"><!--

var date = new Date();

var Month = new Array
("Janruary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December") ; 

var Day = new Array
("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday") ; 

//--></SCRIPT>

HTML

<SCRIPT LANGUAGE="JavaScript">document.write(date.Month+date.Day)</SCRIPT>
 

[/code]

The Cyber World

Tags:
Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 weeks 6 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

JavaScript - Writing the Date using an Array

Hi rmcivo1,
try something like<SCRIPT LANGUAGE="JavaScript">document.write(Month[date.getMonth()] +" "+Day[date.getDay()])</SCRIPT>
Hope that helps

rmcivo1
Offline
Enthusiast
Shropshire | Shrewsbury
Last seen: 9 years 2 weeks ago
Shropshire | Shrewsbury
Joined: 2003-12-05
Posts: 115
Points: 0

Thank You

Thank you for that, I thought that I got most of the Script wrong. Thank you.

What would you suggest I should learn after the Clock in Javascript

Thank You
Rees
Laughing out loud

The Cyber World

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 weeks 6 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

JavaScript - Writing the Date using an Array

Hi rmcivo1,
There's so much to learn.
Hers's some suggestions.

    String manipulation Regular expressions
    Math
    Functions
Or you could just make up a few problems and learn what you need to solve them.

Hope that helps

[/]
dJomp
dJomp's picture
Offline
Enthusiast
Last seen: 4 years 9 weeks ago
Joined: 2003-03-23
Posts: 422
Points: 0

JavaScript - Writing the Date using an Array

Hope that's not your actual list of months, Rees... where'd February go? Laughing out loud

You know you're a geek when you try to shoo a fly away from the monitor with your cursor.

rmcivo1
Offline
Enthusiast
Shropshire | Shrewsbury
Last seen: 9 years 2 weeks ago
Shropshire | Shrewsbury
Joined: 2003-12-05
Posts: 115
Points: 0

Yeah I did Notice

I did Notice that the Months were Wrong, Thank you for having a Look in that much great detail.

Thank you Tony Thats has made my webpage, lok abit more Interesting

Best Regards
Rees

The Cyber World