Javatpoint Logo
Javatpoint Logo

jQuery now() method

The now() method in jQuery returns a number that represents the current time. This method returns the number of milliseconds from midnight of January 1, 1970 to the current time.

The now() method returns a number representing the number of milliseconds.

Syntax

It does not accept any parameters.

Example

In this example, we are using the now() method to display the number of milliseconds from midnight of Jan 1, 1970 to the current time.

Test it Now

Output

After the execution of the above code, the output will be -

jQuery now() method

On clicking the given button, an alert box will be displayed showing the number of milliseconds as shown in the following screenshot.

jQuery now() method





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA