javascript getDate() method


  Translation results:

get

英[get] 美[ɡɛt]

vt. Get; catch; persuade; receive (punishment, etc.)

vt.& vi. Arrive, come

vi. Become; start; try to deal with; obtain benefits or wealth

n. Reproduce, cub; profit

Third person singular : gets present participle: getting past tense: got past participle: got gotten

#date

##英[deɪt] 美[det]

n. Dating; date, day; era, age; (of the date palm tree common in North Africa and West Asia) date palm

vt. out of date; to make... appear old; to show the era (or age) of...; to identify... Era

vt.& vi.Date with someone, make an appointment

vi. Belong to a certain period; calculate the date from a certain time; record the date; mark (or indicate) the date

Third person singular: dates Plural: dates Present participle: dating Past tense: dated Past participle: dated

javascript getDate() methodsyntax

Function: Returns a certain day of the month.

Syntax: dateObject.getDate()

Returns: The day of the month pointed to by dateObject, using local time. The return value is an integer between 1 ~ 31.

Note: This method is always used in conjunction with a Date object.

javascript getDate() methodexample

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script type="text/javascript">

    var d = new Date()
    document.write(d.getDate())

</script>

</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance

Home

Videos

Q&A