?? updatenews.jsp~14~
字號:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.util.List"%>
<%@ page import="java.sql.*"%>
<%@ page import="com.victor.domain.NewsActionForm"%>
<%@ page import="com.victor.domain.NewsTypeActionForm"%>
<html>
<head>
<title>修改新聞</title>
</head>
<script language="JavaScript">
function RgTest(){
if(document.form.newTitle.value==""){
window.alert("請輸入新聞標題:");
document.form.newTitle.focus();
return false;
}
if(document.form.newsType.value=="請選擇"){
window.alert("請選擇新聞類型:");
document.form.newsType.focus();
return false;
}
if(document.form.newStyle.value==""){
window.alert("newStyle:");
document.form.newStyle.focus();
return false;
}
if(document.form.newContent.value==""){
window.alert("請輸入新聞內容:");
document.form.newContent.focus();
return false;
}
return true;
}
</script>
<body bgcolor="#ffffc0">
<div align="center" >
<p>修改新聞</p>
<form name="form" method="post" action="" onSubmit="return RgTest()">
<table width="327" border="3" cellspacing="3" cellpadding="3">
<tr>
<td width="84">新聞標題</td>
<td width="212"><input type="text" name="newTitle"></td>
</tr>
<tr>
<td height="22">Style</td>
<td><input type="text" name="newStyle"></td>
</tr>
<tr>
<td height="304">新聞內容</td>
<td><textarea name="newContent"></textarea></td>
</tr>
<%}%>
<tr>
<td>新聞類型</td>
<td><select name="newsType">
<option value="請選擇">請選擇</option>
<%List type=(List)request.getAttribute("type");%>
<%for(int i=0;i<type.size();i++){
NewsTypeActionForm newsTypeActionForm=(NewsTypeActionForm)type.get(i);
%>
<option value="<%=newsTypeActionForm.getTypeName()%>"><%=newsTypeActionForm.getTypeName()%></option>
<%}%>
</select>
</td>
</tr>
</table>
<input type="submit" name="Submit2" value="提交">
<input type="reset" name="Submit" value="重置">
</form>
<p> </p>
</div>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -