<html> <body> <script type="text/javascript"> var d = new Date() var time = d.getHours() var m = d.getMinutes(); var s = d.getSeconds(); if (m<10) { document.write(time+":0"+m+":"+s); } else { document.write(time+":"+m+":"+s); } if (time < 10) { document.write("<b>早安</b>") } if (time >= 10 && time <12) { document.write("<b>同志们上午午好</b>") } </script> </body> </html>
?