What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-02-02 12:35:16
what is Date.now() javascript
var d= new Date(); d.getFullYear();//Get the year as a four digit number (yyyy) d.getMonth();//Get the month as a number (0-11) d.getDate();//Get the day as a number (1-31) d.getHours();//Get the hour (0-23) d.getMinutes();//Get the minute (0-59) d.... Add solution -
Javascript 2022-02-01 05:07:01
js get first and last day of previous month
var d = new Date(); d.setDate(0); //sets d to the last day of the previous month d.setDate(1); //sets d the the first day of that month d.setHours(0,0,0,0); //sets d time to midnight //d now equals the first day of the month before today Add solution -
Javascript 2022-02-01 04:21:44
refresh page after 10 mins of inactivity
If you want to refresh the page if there is no activity then you need to figure out how to define activity. Let's say we refresh the page every minute unless someone presses a key or moves the mouse. This uses jQuery for event binding: <script> ... Add solution -
Javascript 2022-01-28 15:51:41
javascript date methods
var d= new Date(); d.getFullYear(); //Get the year as a four digit number (yyyy) d.getMonth(); //Get the month as a number (0-11) d.getDate(); //Get the day as a number (1-31) d.getHours(); //Get the hour (0-23) d.getMinutes(); //Get the minute (0-59) d.g... Add solution