📄 news.jsp
字号:
<%@ taglib prefix="NewsReply" uri="/WEB-INF/NewsReply.tld" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
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>My JSP 'News.jsp' starting page</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">
-->
</head>
<script type="text/javascript">
function show(rtr)
{
var rtr2=document.getElementById(rtr);
if(rtr2.style.display=="none")
{
rtr2.style.display="block";
}
else
{
rtr2.style.display="none";
}
}
</script>
<body>
<table align="center" width="1000">
<tr>
<td ></td>
<td align="center" width="800"><font size="5">${news.ntitle}<br><br></font></td>
<td ></td>
</tr>
<tr>
<td ></td>
<td width="800"><font size="4">${news.ncontent}</font></td>
<td ></td>
</tr>
</table>
<p align="center"><span style="cursor: hand" onClick="show('rtr${news.nid}');">发表评论</span>
<span style="cursor: hand" onClick="show('Select${news.nid}');">查看评论</span></p>
<form action="NewsReplyinsert.do4" method="post">
<p id="rtr${news.nid}" style="display: none">
<table border="1">
<tr>
<input type="hidden" name="nid" value=${news.nid }>
<td colspan="2" align="center">发表评论</td>
</tr>
<tr>
<td>评论标题<input type="hidden" name="nid" value="${news.nid }">${news.nid}</td>
<td><input type="text" name="nrtitle" size="110"></td>
</tr>
<tr>
<td>评论内容</td>
<td><textarea rows="10" cols="84" name="nrContent"></textarea></td>
</tr>
<tr>
<td>操作</td>
<td align="center"><input type="submit" value="提交"> <input type="reset" value="重置"></td>
</tr>
</table>
</p>
</form>
<p id="Select${news.nid}" style="display: none">
<table border="1" width="600" height="300">
<tr align="left">
<td align="left">显示该新闻所有评论:</td>
</tr>
<tr align="left">
<td align="left"><NewsReply:reply>${news.nid}</NewsReply:reply></td>
</tr>
</table>
</p>
<p align="right"><font size="3"><i>${curpage}(作者: ${news.mname}, 发表时间: ${news.ndatetime} 评论数:${nidcount})</i><a href="NewsSelectPage.do3?id=${id}&curpage=${curpage}&pagesize=${pagesize}">返回</a></font></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -