Ver Mensaje Individual
  #4 (permalink)  
Antiguo 21/12/2013, 10:42
bathorz
 
Fecha de Ingreso: agosto-2013
Mensajes: 150
Antigüedad: 11 años, 5 meses
Puntos: 29
Respuesta: No encuentro error

No entendí la respuesta. No sé si has visto el fallo o es que, aún cambiando las 2 líneas, el mismo persiste. En esas 2 líneas hay un error de concatenado.
El script tal cual sigue funciona correctamente:
Código HTML:
Ver original
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.    <head>
  4.       <meta charset="utf-8">
  5.       <title>El script de fecha y hora actual</title>
  6.    </head>
  7.    <body>
  8.       <p>
  9.          <h1>FECHA Y HORA ACTUAL:</h1>
  10.       </p>
  11.       <p>
  12.          <script>
  13.             var now = new Date();
  14.             localtime = now.toString();
  15.             utctime = now.toGMTString();
  16.             document.write("<b>Hora local:</b>" + localtime + "<br>");
  17.             document.write("<b>Hora UTC:</b>" + utctime);
  18.             hours = now.getHours();
  19.             mins = now.getMinutes();
  20.             secs = now.getSeconds();
  21.             document.write("<h1>");
  22.             document.write(hours + ":" + mins + ":" + secs);
  23.             document.write("</h1>");
  24.          </script>
  25.       </p>
  26.    </body>
  27. </html>