📄 addnotice.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%
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 href="<%=basePath%>/css/style.css" rel="stylesheet">
<link href="<%=basePath%>/css/main.css" rel="stylesheet">
</head>
<script type="text/javascript">
function ShowTime()
{
var now,clock_line,time_text;
now=new Date();
time_text =now.getYear()+"-"+(now.getMonth()+1)+"-"+now.getDate()+" "+now.getHours()+":"+now.getMinutes()+":"+now.getSeconds();
clock_line=document.all("clock");
clock_line.innerText=time_text;
setTimeout("ShowTime();",200);
}
function addnotice(){
var title=document.showform.title.value;
var content=document.showform.content.value;
if(title==""){
alert('请输入要发表的主题!');
document.showform.title.focus();
return false;
}
if(content==""){
alert('请输入要发表的内容!');
document.showform.content.focus();
return false;
}
document.showform.action="notice.do?method=AddNotice";
document.showform.submit();
return true;
}
</script>
<body onload="ShowTime();">
<form action="" name="showform" method="post">
<div class="right">
<div class="content">
<p align="center">
发布新的公告
</p>
<table width="462" border="1" class="table">
<tr>
<td width="131">
已发布公告
</td>
<td colspan="2">
发布新公告
</td>
</tr>
<tr>
<td rowspan="5">
<marquee id=scrollarea onmouseover=this.stop();
onmouseout=this.start(); scrollAmount=3 scrollDelay=100
direction=up loop=-1>
<logic:present name="notice">
<logic:iterate id="n" name="notice"
type="com.jxyd.vo.NoticeBean">
<%=n.getTitle()%><br>
<%=n.getContent()%><br>
<%=(n.getAddDate().substring(0, 10))%><br>
***************************<br>
</logic:iterate>
</logic:present>
</marquee>
</td>
<td>
主题
</td>
<td width="296">
<label>
<input type="text" name="title" />
</label>
</td>
</tr>
<tr>
<td>
内<br>
容
</td>
<td>
<label>
<textarea name="content" cols="35" rows="6"></textarea>
</label>
</td>
</tr>
<tr>
<td>
可见类型
</td>
<td>
学员
<label>
<input type="radio" name="type" value="2" checked="checked" />
</label>
<label>
教员
<input type="radio" name="type" value="1" />
</label>
</td>
</tr>
<tr>
<td>
发布时间
</td>
<td>
<label>
<input type="text" name="date" id="clock"/>
</label>
</td>
</tr>
<tr>
<td colspan="2">
<label>
<input type="button" name="Submit" value="提交" onclick="addnotice()"/>
<input type="reset" name="Submit2" value="取消" />
</label>
</td>
</tr>
</table>
</div>
</div>
<!--end RIGHT-->
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -