Display the current date on the web page (JavaScript)

xiaoxiao2021-04-09  459

<

Script logage

=

JavaScript

>

TMPDATE

=

New

Date (); DATE

=

TMPDATE.GETDATE (); MONTH

=

TMPDATE.GETMONTH ()

1

Year

=

TMPDATE.GETYAR (); Document.write (Year)

"

year

"

Moth

"

month

"

date

"

day

"

); MyArray

=

New

ARRAY

6

); Myarray [

0

]

=

"

on Sunday

"

MyArray [

1

]

=

"

Monday

"

MyArray [

2

]

=

"

Tuesday

"

MyArray [

3

]

=

"

Wednesday

"

MyArray [

4

]

=

"

Thursday

"

MyArray [

5

]

=

"

Friday

"

MyArray [

6

]

=

"

on Saturday

"

Weekday

=

TMPDATE.GETDAY (); Document.write (MyArray [weekday]);

//

->

Script

>

转载请注明原文地址:https://www.9cbs.com/read-133145.html

New Post(0)