Relógio / Hora em Javascript
Publicado por Leandro Alexandre ® 05/01/2009
[ Hits: 14.002 ]
Client-side.
Exibe a hora do usuário que esta acessando a página.
<html> <title>Relógio / Hora em Javascript</title> <script language="javascript"> var timerID = null; var timerRunning = false; function stopclock() { if(timerRunning) clearTimeout(timerID) timerRunning = false; } function startclock() { stopclock(); showtime(); } function showtime() { var now = new Date(); var hours = now.getHours(); var minutes = now.getMinutes(); var seconds = now.getSeconds(); var timeValue = "" + ((hours > 12) ? hours - 12 : hours); timeValue += ((minutes < 10) ? ":0" : ":") + minutes; timeValue += ((seconds < 10) ? ":0" : ":") + seconds; timeValue += (hours >= 12) ? " P.M." : " A.M."; document.clock.face.value = timeValue; timerID = setTimeout("showtime()",1000); timerRunning = true; } //--> </script> <form name="clock" onSubmit="0"> <input type="text" name="face" size="12"> </form> <body> <script>startclock();</script> <hr width=40% align=left> Hora em Javascript<br/> www.leandro.adm.br </body> </html>
Funções para converter de moeda para float e vice-versa
Notícias do site Ultimo Segundo
Gerador de exercícios para matemática
Nenhum comentário foi encontrado.
Como escolher o melhor escalonador de CPU para melhorar o desempenho da máquina
Curiosidade sobre DOOM Guy e Isabelle de Animal Crossing
Inicializando servidor Ubuntu na AWS e rodando apache em Container
Instalando TeamViewer no Debian 12
Conheça o Octopi, outro frontend para o Pacman com acesso ao AUR (Arch Linux e derivados)
Terminal transparente no Debian 12 com interface i3wm usando Xfce4-Terminal e Compton
horário adiantado no sistema (11)
Apertei Crtl+alt+f4 e agora somente inicia na linha de comando (0)
Eu estou com problemas para usar o QBASIC no Dosbox X (3)
Tibia não pode ser aberto em virtual machine (14)
Após atualização do Ubuntu 22.04.4 LTS perdi a instalação da placa de ... (3)