<script>
window.onload=function(){
var dt = new Date();
var tm = dt.getHours();
var s = "";
if(tm==24) tm = 0;
if(tm>=0 && tm<=10) s = "good morning";
else if(tm>=11 && tm <=18) s = "good arternoon";
else if(tm>=19) s = "good evening";
document.getElementById("pad").innerHTML = s;
}
</script>
<body>
<div id="pad"></div>
</body>
window.onload=function(){
var dt = new Date();
var tm = dt.getHours();
var s = "";
if(tm==24) tm = 0;
if(tm>=0 && tm<=10) s = "good morning";
else if(tm>=11 && tm <=18) s = "good arternoon";
else if(tm>=19) s = "good evening";
document.getElementById("pad").innerHTML = s;
}
</script>
<body>
<div id="pad"></div>
</body>
<script type="text/javascript">
function regard(){
var date= new Date();
var hour= date.getHours();
var regardStr = " ";
if(hour==24) hour= 0;
if(hour>=0 && hour<=10) regardStr = "good morning ";
else if(hour>=11 && hour<=18) regardStr = "good arternoon ";
else if(hour>=19) regardStr = "good evening ";
document.getElementById( "pad ").innerHTML = regardStr ;
}
</script >
<body onload="regard()">
<table>
<tr><td id="regard"></td></tr>
</table>
</body >
</html>
强