time in ms js code example
Example 1: javascript get Time
var d=new Date();
d.getTime();//I'm in milliseconds, divide by 1000 for seconds
Example 2: get time in javascript
//HTML
<a onclick="timeNow(test1)" href="#">SET TIME</a>
//Javascript
function timeNow(i) {
i.value = new Date()
}