document.write((when.getMonth()+1)+"月");
document.write(when.getDate()+"日<br>");
document.write(when.getHours()+"时");
document.write(when.getMinutes()+"分");
document.write("</h4>");
</script>
在该模块中,我们使用JavaScript脚本语言来提取日期及时间。例如,首先我们通过new Date()提取当前的日期及时间,并将其赋予when变量。然后再通过when.getYear()提取年、when.getMonth()提取月、when.getDate提取日等。
//包含登录信息页面
<%@ include file="denglu.jsp"%>
//包含畅销图书榜模块
<%@include file="changxiao.jsp"%>
//包含促销图书模块
<%@ include file="chuxiao.jsp"%>
//包含动态滚动条信息
<%@ include file="scroll.htm"%>
//包含分类显示模块
<%@ include file="toplist.jsp"%>
//包含新进图书模块
<%@ include file="newbooks1.jsp"%>
<%@ include file="new.jsp"%></td>
//包含主页面尾文件
<%@ include file="end.jsp"%>
在上面的代码中我们主要列出了在Index.jsp文件中所包含的所有包含文件,用户可以通过光盘中所给出的网站来查看Index.jsp文件的源代码。