005.htm < html > < head > < title > study 005 </ title > </ head > < body > < p > < script language ="JavaScript" type ="text/javascript" src ="datetime.js" ></ script > </ p > </ body > </ html > datetime.js now = new Date();localtime = now.toString();utctime = now.toGMTString();document.write( " <b>本地时间:</b> " + localtime + " <br> " );document.write( " <b>世界时间:</b> " + utctime + " <br> " );hours = now.getHours();mins = now.getMinutes();secs = now.getSeconds();document.write( " <h1> " );document.write(hours + " 时 " + mins + " 分 " + secs + " 秒 " );document.write( " </h1> " );