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

📄 lookpicture.jsp

📁 一般网页里面实现图片切换的这个电子相册的代码
💻 JSP
字号:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" errorPage="showdirpicture.jsp" %>
<%String path = request.getContextPath();
			String basePath = request.getScheme() + "://"
					+ request.getServerName() + ":" + request.getServerPort()
					+ path + "/";
%>

<%@page import="java.sql.*,java.util.*,userpicture.showlistBean,java.io.*" %>
<%
  if((String) session.getAttribute("login") == null) {
	response.sendRedirect("Login.jsp");
	}

%>





<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<jsp:useBean id="show" scope="page" class="userpicture.showlistBean"></jsp:useBean>
<%
	String myid = (String)session.getAttribute("id");
 	long num = Long.parseLong(request.getParameter("number")); 
 	String dir=(String)session.getAttribute("id");
 	show.getPicture(myid,dir);
 	System.out.println("number="+dir);
 	
%>

<html>
	<head>
		<base href="<%=basePath%>">

		<title>梦境电子相册自动播放照片</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">

		<!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
	</head>
	<body style="BACKGROUND: #000000" onload="onload=init()">
		<P>
			 &nbsp;
			<BR>
		<center>
			<FONT color="#0000ff" size="5">欢迎光临我的电子相册网</FONT>
		</center>
		</P>
		<P>
			<BR>
			<FONT color="#ff0080">欢迎你,<%=session.getAttribute("id")%></FONT>
		</P>
		 &nbsp;&nbsp;&nbsp;&nbsp;
	<A href='Index.jsp'><FONT color="#23ded5">首页&nbsp;</FONT></A><FONT color="#23ded5"> &nbsp;&nbsp;&nbsp;&nbsp;</FONT><FONT color="#23ded5"> &nbsp;&nbsp;&nbsp;&nbsp;</FONT></FONT>
		<A href="MyManager.jsp?number=0"> <FONT color="#23ded5"> 相册管理 </FONT></A>
		<FONTcolor ded5="">
		 &nbsp;&nbsp;&nbsp;
		<FONT></FONT>
		<A href="Upload.jsp"><FONT color="#23ded5"> 照片上传</FONT></A>
		<FONT color="#23ded5"> &nbsp;&nbsp;&nbsp; </FONT>
		<A href="Login.jsp"><FONT color="#23ded5">重新登陆</FONT></A>
		<DIV class=ttl1 id=ttl0>
			<SPAN class=ttl1></SPAN>
		</DIV>
		</P>
		<br>
		<% session.setAttribute("first","1"); %>
		<%
			while(num < show.getTotal())
			{
				//if(num >= show.getTotal())
				//	num = 0;
			
		%>
		<P align="center">
		<IMG name="myPicture" src='C:\test\<%=session.getAttribute("id")%>\<%=dir %>\<%=show.getIndex(num) %>' width="400px" height="300px">
		<BR>			
		<center>
			<FONT color="#ff0080">相册
			<%=session.getAttribute("id")%>\<%=dir %>\<%=show.getIndex(num)%></FONT>
		</center>
			<BR>
			<center>
			<FONT color="#00ff40"> 这是第<%=num+1 %>照片,总共<%=show.getTotal() %>照片。</FONT>
			</center>
			<center>
			<FONT color="#00ff40"> 上传时间:<%=show.gettime(num) %></FONT>
			</center>
		
			
		</P>
		<%
			Thread.sleep(2000);
			}
		%>
		
	</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -