?? materialedit.jsp
字號:
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<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">
-->
<script language="JavaScript">
<!--
function validate_form() {
validity = true;
if (!check_empty(document.getElementById("materialtitle").value)){
validity = false;
alert('對不起!資料內容不能為空,請重新輸入');
}else if (!check_empty(document.getElementById("materialcontent").value)){
validity = false;
alert('對不起!資料標題不能為空,請重新輸入');
}
return validity;
}
function check_empty(str) {
return (str.length > 0);
}
// -->
</script>
</head>
<body>
<body>
<center>
<table width="980" height="560" cellspacing="0" cellpadding="0"
border="0" bgcolor="#c1dedf">
<tbody>
<tr align="center">
<td colspan="2" bgcolor="#c0c0c0" height="100">
<%@include file="header.jsp"%>
</td>
</tr>
<tr>
<td width="100">
<%@include file="menu.jsp"%>
</td>
<td>
>>資料編輯
<center>
<html:form action="materialSave" method="post" onsubmit="return validate_form()">
<html:hidden property="materialid"
value="${material.materialid}" />
<html:hidden property="materialdate"
value="${material.materialdate}" />
<html:hidden property="userid" value="${material.user.userid}" />
<table>
<tr>
<td>
資料編號:
</td>
<td>
${material.materialid}
</td>
</tr>
<tr>
<td>
標題:
</td>
<td>
<html:text property="materialtitle"
value="${material.materialtitle}"></html:text>
*
</td>
</tr>
<tr>
<td>
所屬類別:
</td>
<td>
<html:select property="typeid">
<c:forEach var="type" items="${types}">
<html:option value="${type.typeid}">${type.typename}</html:option>
</c:forEach>
</html:select>
</td>
</tr>
<tr>
<td>
內容:
</td>
<td>
<html:textarea property="materialcontent" cols="20"
value="${material.materialcontent}" rows="10"></html:textarea>
*
</td>
</tr>
<tr>
<td>
<html:submit value="提交" />
</td>
<td>
<input type="button" onclick="history.go(-1)" value=取消>
</td>
</tr>
</table>
</html:form>
</center>
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#a2a2a2" align="center">
<%@include file="footer.jsp"%>
</td>
</tr>
</tbody>
</table>
</center>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -