What time is it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What time is it?

Copy and paste into the Playground: <!DOCTYPE html> <html> <head> <title>Page Title</title> <style> body { padding: 60px; background-color: #000; color: lime; font-size: 46pt; } </style> </head> <body> <script> function printTime() { var d = new Date(); var hours = d.getHours(); var mins = d.getMinutes(); var secs = d.getSeconds(); document.body.innerHTML = hours+":"+mins+":"+secs; } setInterval(printTime, 1000); </script> </body> </html>

26th Jun 2016, 1:55 AM
ZinC
ZinC - avatar
5 Answers
0
Nickel comme code, merci beaucoup :)
26th Jun 2016, 8:27 AM
Martin Rostagnat
Martin Rostagnat - avatar
0
@Aman Nice addition. Thanks!
26th Jun 2016, 6:28 PM
ZinC
ZinC - avatar
0
how to copy paste?
28th Jun 2016, 3:13 PM
Killua Zoldyck
Killua Zoldyck - avatar
0
@Killua, press and hold anywhere on the text you want to copy. You'll see a bit of text got selected and a new menu shows up in top-right with small icons. One of them means "select all". Click on it. Then click the next one to copy. Go to Playground and create a new doc. Paste what you've copied under 'html' then hit 'Run'.
29th Jun 2016, 12:46 AM
ZinC
ZinC - avatar
0
I adore you zinc 🙌
24th Jul 2016, 11:27 PM
Ozii
Ozii - avatar