{"id":44,"date":"2022-11-09T17:35:16","date_gmt":"2022-11-09T17:35:16","guid":{"rendered":"http:\/\/javigomez.org\/?p=44"},"modified":"2025-09-29T20:34:30","modified_gmt":"2025-09-29T20:34:30","slug":"hacer-un-reloj","status":"publish","type":"post","link":"https:\/\/javigomez.org\/index.php\/2022\/11\/09\/hacer-un-reloj\/","title":{"rendered":"Hacer un reloj"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html>\n    &lt;html> \n        &lt;head>\n            &lt;title>Cronometro&lt;\/title>\n        &lt;\/head>\n    &lt;body>\n&lt;div id=\"Hora\">&lt;\/div>\n\n&lt;script>\n    function crono(){\n        var elCrono;\n        var miFecha=new Date();\n        horas=miFecha.getHours();\n        min=miFecha.getMinutes();\n        seg=miFecha.getSeconds();\n        if (horas>12) {\n            momento=\"pm\";\n            horas-=12;\n        }\n        else {\n            momento=\"am\";\n        }\n        if (horas&lt;10) horas=\"0\"+horas;\n        if (min&lt;10) min=\"0\"+min;\n        if (seg&lt;10) seg=\"0\"+seg;\n        document.getElementById(\"Hora\").innerHTML=horas+\":\"+min+\":\"+seg+\" \"+momento;\n    }\nwindow.onload=function(){\n    elCrono=setInterval(crono,1000);\n}\n&lt;\/script>\n&lt;\/body>\n&lt;\/html>\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-javascript"],"_links":{"self":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/comments?post=44"}],"version-history":[{"count":1,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/44\/revisions"}],"predecessor-version":[{"id":991,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/44\/revisions\/991"}],"wp:attachment":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/media?parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/categories?post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/tags?post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}