www.gusucode.com > CC校友录贴吧 CCBar源码程序asp编程 > js/main_func.js
<script language="JavaScript"> /**********************************************************************/ /* Function : showHellow Created At July,12,2003 /* Input : None /* Output : None /* Description : 问候语提示 /***********************************************************************/ function showHello() { var welcomestring; var d = new Date(); h = d.getHours(); if(h<6) welcomestring="凌晨好"; else if (h<9) welcomestring="早上好"; else if (h<12) welcomestring="上午好"; else if (h<14) welcomestring="中午好"; else if (h<17) welcomestring="下午好"; else if (h<19) welcomestring="傍晚好"; else if (h<22) welcomestring="晚上好"; else welcomestring="夜里好"; document.write(welcomestring); } </script>