📄 news-search.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%@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"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>搜索新闻</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
body {
margin-left: 6px;
margin-top: 5px;
margin-right: 0px;
margin-bottom: 0px;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: underline;
color: #333333;
}
a:active {
text-decoration: none;
color: #333333;
}
-->
</style>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/ajax.js"></script>
<link href="../css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {
font-size: 14px;
font-weight: bold;
color: #FFFFFF;
}
-->
</style>
</head>
<script type="text/javascript">
send_request("<%=request.getContextPath()%>/newsSort.do");
function searchchk(){
var date = "^[0-9]{4}-(01|02|03|04|05|06|07|08|09|10|11|12)-(0|1|2|3)[0-9]$";
var date1 = fr.date1.value;
var date2 = fr.date2.vauel;
if(date1!=""&&!date1.match(date)){
alert("请输入正确格式的发布日期(格式:2007-01-01)!");
return false;
}
if(date2!=""&&!date2.match(date)){
alert("请输入正确格式的发布日期(格式:2007-01-01)!");
return false;
}
return true;
}
</script>
<body>
<form action="../newsSearch.do" method="post" name="fr" onsubmit="return searchchk()">
<table width="746" border="0" cellpadding="0" cellspacing="1" bgcolor="#3868F8">
<tr>
<td width="378" height="25" bgcolor="#A4B5E3"> <span class="STYLE1">搜索新闻</span></td>
</tr>
<tr>
<td height="54" bgcolor="#FFFFFF" valign="top" style="padding-top:4px; padding-bottom:3px; padding-left:4px; padding-right:4px;"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="72" height="22" bgcolor="#FFFFFF"><div align="center">新闻标题:</div></td>
<td height="22" bgcolor="#FFFFFF" style="padding-left:4px;"><input name="title" type="text" size="35" /></td>
</tr>
<tr>
<td height="22" bgcolor="#FFFFFF"><div align="center">新闻分类:</div></td>
<td height="22" bgcolor="#FFFFFF" style="padding-left:4px;"><select name="sort" id="sort">
</select></td>
</tr>
<tr>
<td height="22" bgcolor="#FFFFFF"><div align="center">发布日期:</div></td>
<td height="22" bgcolor="#FFFFFF" style="padding-left:4px;">
从<input name="date1" type="text" size="20" /> 到
<input name="date2" type="text" size="20" /> (格式:2007-01-01)
</td>
</tr>
</table></td>
</tr>
</table>
<table width="747" border="0">
<tr>
<th width="741" scope="col">
<input type="submit" name="Submit" value="提 交" />
<input type="submit" name="Submit2" value="修 改" />
</th>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -