javascript - Wrong output to web browser -


i tryed show browser date , time, have wrong output.
maybe miss can't catch is?
encoding ansi.

output:
current date , time - it's output.

code:

<html>     <head><title>show date‹</title></head>         <body>             <h1>current date , time</h1>             <p>                 <script language="javascript">                     = new date();                     localtime = now.tostring();                     utctime = now.togmtstring();                     hours = now.gethours();                     mins = now.getminutes();                     secs = now.getseconds();                      document.write("<b>current time: </b>" + localtime + "<br>");                      document.write("<b>asolute time: </b>" + utctime + "</p>");                      document.write("<font size='+5'>");                         document.write(hours + ":" + mins + ":" + secs);                      document.write("</font>);                 </script>         </body> </html> 

question:

  • how solve problem?

from code part:

  document.write("<font size='+5'>");      document.write(hours + ":" + mins + ":" + secs);   document.write("</font>); </script> 

you missed " mark here => document.write("</font>");


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -