< html > < head > < title > study 014 </ title > </ head > < body > < script language ="JavaScript" type ="text/javascript" > ... now = new Date();hours = now.getHours();mins = now.getMinutes();secs = now.getSeconds();document.write("<h2>");document.write(hours + "时" + mins + "分" + secs + "秒");document.write("</h2>");document.write("<p>");if (hours < 10) document.write("早上好");else if (hours >= 14 && hours <= 17) document.wirte("中午好");else if (hours > 17) document.write("晚上好");else document.write("日安");document.write("</p>"); </ script > </ body > </ html >