get.time w3s code example
Example 1: js get date in ms
Date.now() // 1602680486141
Example 2: get time in javascript
//HTML
<a onclick="timeNow(test1)" href="#">SET TIME</a>
//Javascript
function timeNow(i) {
i.value = new Date()
}
Date.now() // 1602680486141
//HTML
<a onclick="timeNow(test1)" href="#">SET TIME</a>
//Javascript
function timeNow(i) {
i.value = new Date()
}