📄 index.jsp
字号:
<%@page contentType="text/html;charset=utf-8" %>
<%@ pagepageEncoding="utf-8"%>
<%@page isELIgnored="false" %>
<%@taglib uri="http://www.tarena.com.cn/sd0808/tags" prefix="ui" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Tarena ShopCart</title>
<script>
var tid = null;
function timer(){
var now = new Date();
var theDiv = document.getElementById("watch");
theDiv.innerHTML=now.toLocaleString();
}
function start(){
if(tid==null){
tid = setInterval("timer()","1000");
}
}
function stop(){
if(tid!=null){
clearInterval(tid);
tid=null;
}
}
new start();
</script>
<script>
var tid = null;
function dateTime(){
var now=new Date();
var theDiv = document.getElementById("welcome");
var hour=now.getHours();
if(hour>=0 && hour<6){
theDiv.innerHTML="凌晨好,欢迎访问本站";
}
if(hour>=6 && hour<12){
theDiv.innerHTML="上午好,欢迎访问本站";
}
if(hour>=12 && hour<18){
theDiv.innerHTML="下午好,欢迎访问本站";
}
if(hour>=18 && hour<24){
theDiv.innerHTML="晚上好,欢迎访问本站";
}
}
function startWelcome(){
if(tid==null){
tid = setInterval("dateTime()","1000");
}
}
new startWelcome();
</script>
</head>
<body>
<center>
<table border=1 width="90%">
<tr height="100px">
<td align="center"><h1>IT Tarena ShopCart</h1></td>
</tr>
<tr height="30px">
<td>
<table border=1 width="100%">
<tr>
<td width="40%" align="center"><div id="welcome"></div></td>
<td width="30%" align="center"> <div id="watch"></div></td>
<td width="30%" align="center">
<a href="index.jsp">Home</a> | <a href="login.jsp">Login</a> | <a href="registe.jsp">Regist</a> | <a href="cart.jsp">Cart</a>
</td>
</tr>
</table>
</td>
</tr>
<tr height="400px">
<td>
<table width="100%" border=1 height="100%">
<tr>
<td>
<center>
<form action="${pageContext.request.contextPath }/login.do" method="post">
<table border="1">
<tr>
<td colspan="3" align="center">登录本站</td>
</tr>
<tr>
<td>用户名:</td>
<td colspan="2"><input type="text" name="user"></td>
</tr>
<tr>
<td>口 令:</td>
<td colspan="2"><input type="password" name="pass"></td>
</tr>
<tr>
<td>附加码:</td>
<td><input type="text" name="code"><img src="code.ver" width="40px" height="20px"></td>
<td> </td>
</tr>
<tr>
<td colspan="3">
<d><input type="submit" value="登录"/></d>
<d><input type="submit" value="取消"/></d>
<d><input type="submit" value="注册"/></d>
</td>
</tr>
</table>
</form>
</center>
</td>
<td rowspan="2" valign="top">
<ui:plist></ui:plist>
</td>
</tr>
<tr>
<td width="200px" valign="top"><jsp:useBean id="menu" class="beans.MenuBean"><jsp:getProperty name="menu" property="menu"/>
</jsp:useBean>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">Tarena It Training Group</td>
</tr>
</table>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -