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.
It does not accept any parameters.
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
After the execution of the above code, the output will be -
On clicking the given button, an alert box will be displayed showing the number of milliseconds as shown in the following screenshot.
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week