jQuery.now()Method

jQuery 杂项方法jQuery Miscellaneous Methods

Example

Return the Unix timestamp of the current time

$(function () { document.body.innerHTML = $.now(); })

Try it Yourself »

Definition and Usage

The $.now() function is used to return the number of milliseconds that have elapsed since midnight on January 1, 1970.

Note: This method does not accept any parameters.This function is similar to new Date().getTime().


Syntax

$.now( )

jQuery 杂项方法jQuery Miscellaneous Methods

Other Extensions