Ticket #17863: timetest.html
File timetest.html, 382 bytes (added by , 2 years ago) |
---|
Line | |
---|---|
1 | <!DOCTYPE html> |
2 | <html><head><title>regular milliseconds getter</title></head><body> |
3 | Got the milliseconds <span id="cnt">0</span> times now. |
4 | <script> |
5 | var val = 0; |
6 | var cnt = document.getElementById("cnt"); |
7 | var d = new Date(); |
8 | |
9 | function Increment() { |
10 | d.getMilliseconds(); |
11 | for(var i=0;i<10;i++); |
12 | val ++; |
13 | cnt.innerHTML = val; |
14 | }; |
15 | |
16 | setInterval(Increment, 50); |
17 | </script> |
18 | </body></html> |