I found a js code from the Internet to calculate the time difference
effect is that we have been together xx days xx xx minutes xx seconds
problem is that this time will not change
only enter the web page after refreshing to keep the same value
so I want this code to be executed once a second so that the number can be changed every second
consult
I can html css but js ability So 0
it"s best to be as detailed as a fool.
Thank you, boss
<div class=" foot">
<script>
var date1= "2016/05/03 00:00:00";
var date2 = new Date();
var date3 = date2.getTime() - new Date(date1).getTime();
var days=Math.floor(date3/(24*3600*1000));
var leave1=date3%(24*3600*1000) ;
var hours=Math.floor(leave1/(3600*1000));
var leave2=leave1%(3600*1000);
var minutes=Math.floor(leave2/(60*1000));
var leave3=leave2%(60*1000) ;
var seconds=Math.round(leave3/1000);
alert(" "+days+" "+hours+" "+minutes+" "+seconds+" ");
</script>
</div>