⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.jsp

📁 java网上商店代码
💻 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">${userinfo.uname }<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 align="center" valign="top">
  				&nbsp;<p/>  
  				<form action="${pageContext.request.contextPath }/login.do"  method="post">				  					
  				<table border="1"   width="200px">
  					<tr>
  						<td>Name:</td>
  						<td>
  							<input style="width:120;" 
  							name="user" type="text" value=""/>
  						</td>
  					</tr>
  					<tr>
  						<td>Pass:</td>
  						<td>
  							<input style="width:120;" 
  							name="pass" type="password" value=""/>
  						</td>
  					</tr>
  					<tr>
  						<td>Code:</td>
  						<td valign="center">
  							<input style="width:80px;" 
  							name="code" type="text" value=""/>
  							<img src="code.ver" width="40px" height="20px">
  						</td>
  					</tr>
  					<tr>
  						<td colspan="2">&nbsp;</td>
  					</tr>
  					<tr>
  						<td colspan="2" align="center">
  							<input type="submit" value="Login">
  							&nbsp;&nbsp;&nbsp;&nbsp;
  							<input type="reset" value="Cancel"> 
  						</td>
  					</tr>
  					
  				</table>  		
  				</form>		  				
  			</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 + -