<html> <head> <script type="text/vbscript"> function greeting() i=hour(time) If i = 8 then document.write("开始工作") elseif i = 11 then document.write("喝杯水,继续") elseif i = 12 then document.write("中饭时间到了") elseif i = 18 then document.write("回家") else document.write("……") end if end function </script> </head> <body onload="greeting()"> </body> </html>
编辑上面的文字,按下“查看结果”,效果会显示在右边 Create by 软晨网(RuanChen.com)