Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery.now() method

jQuery.now() method

jQuery Miscellaneous MethodsjQuery Miscellaneous Methods

Example

Return the Unix timestamp of the current time

$

(

function

(

)

{

document

.

body

.

innerHTML

= $.

now

(

)

;

}

)

Try it »


Definition and Usage

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

**Note: This method accepts no arguments.** This function is similar to new Date().getTime().


Syntax

$

.now( )

jQuery Miscellaneous MethodsjQuery Miscellaneous Methods