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

📄 view.jsp

📁 java电子相册一般网页里面实现图片切换的这个电子相册的代码
💻 JSP
字号:
<%@ page contentType="text/html;charset=GBK" language="java" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/album.tld" prefix="out" %>
<html:html locale="true">
<%
    String contextPath = request.getContextPath();
%>
<head>
<link href="<%=contextPath%>/css/style.css" rel="stylesheet" type="text/css">
<title>图片详细</title>
<meta http-equiv="content-type" content="text/html;charset=GBK">
<jsp:useBean id="viewForm" scope="session" type="cn.edu.seu.album.web.ViewForm" />
</head>
<script language="Javascript">
<!--
    function doDelete() {
        if(confirm("是否确定删除此图片")) {
            document.viewForm.actionType.value = "delete";
            document.viewForm.submit();
        }
    }
    
    function doEdit() {
        document.viewForm.actionType.value = "update";
    	document.viewForm.submit();
    }

-->
</script>
<body class="othercolor">
<html:form action="/view">
<html:hidden property="actionType" name="viewForm"/>
<html:hidden property="pictureId" name="viewForm"/>
<center>
<table align=center width="600">
  <tr>
    <td width="185">&nbsp;</td><td>
    <table>
<html:errors/></table></td><td width="170">&nbsp;</td></tr>
</table>
</center>
<center>
<img src="<%=contextPath%>/picture?id=<out:write name="viewForm" property="pictureName"/>"/>
<p>
<table>
	<tr>
		<td>图片拥有者</td>
		<td><out:write name="viewForm" property="owner"/></td>
	</tr>
	<tr>
		<td>上传时间:</td>
		<td><out:write name="viewForm" property="uploadTimeStr"/></td>
	</tr>
	<tr>
		<td>最后更新时间:</td>
		<td><out:write name="viewForm" property="lastModifyTimeStr"/></td>
	</tr>
	<tr>
		<td>更新次数:</td>
		<td><out:write name="viewForm" property="modifyTimes"/></td>
	</tr>
	<tr>
		<td>图片权限:</td>
		<logic:equal name="viewForm" property="self" value="true">
		<td>
		<html:radio property="picturePriv" value="U"/>公开
		<html:radio property="picturePriv" value="R"/>私有
		</td>
		</logic:equal>
		<logic:notEqual name="viewForm" property="self" value="true">
		<td><out:write name="viewForm" property="picturePrivName"/></td>
		</logic:notEqual>
	</tr>
	<tr>
		<td colspan="2">图片描述信息:</td>
	</tr>
	<tr>
		<logic:equal name="viewForm" property="self" value="true">
		<td colspan="2"><html:textarea rows="5" cols="40" property="description" name="viewForm"></html:textarea></td>
		</logic:equal>
		<logic:notEqual name="viewForm" property="self" value="true">
		<td colspan="2"><html:textarea rows="5" cols="40" readonly="true" property="description" name="viewForm"></html:textarea></td>
		</logic:notEqual>
	</tr>
</table>
<table><tr>
<td width=300 align=center>
<logic:equal name="viewForm" property="self" value="true">
<button onclick="doEdit()">编辑图片</button>
<button onclick="doDelete()">删除图片</button>
</logic:equal>
<button onclick="window.close()">关闭窗口</button>
</td>
</tr>
<table>
</center>
</html:form>
</body>
</html:html>

⌨️ 快捷键说明

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