ehsan ehsan - 1 year ago 57
jQuery Question

How can I get timeStamp in my code

I want when page loaded get timeStamp but I can't.

This is my code :

<!DOCTYPE html>
<p id = "x">time</p>
<script src="jquery/jquery1.12.js"></script>


You can use Date object to do this work. now() method return timestamp in miliseconds. Of course javascript return timestamp with client time.

    var timeStamp = Math.floor( / 1000);
<script src=""></script>