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
Post a Comment