一个简单的新闻系统之四
主题下新闻的主要内容:
 
newswind.jsp:
<%@page contentType="text/html;charset=GB2312"%>
<%request.setCharacterEncoding(
"GB2312");%>
<%@include file=
"inc.jsp"%>
<Script language=
"JavaScript">
//打开新窗口函数NewsWindow
function NewsWindow(id)
{
window.open('newswind.jsp?id='+id,'infoWin', 'height=400,width=600,scrollbars=yes,resizable=yes');
}
</Script>
<%
String id;
id=request.getParameter(
"id");
sql=
"select * from new_sz where id="+id ;
rs=apple.select(sql);
%>
<html>
<head>
<title>留言测试</title>
</head>
<body>
<table width=
"100%" HEIGHT=100% border="1" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">


<%
while(rs.next() )
{
%>



<tr bgcolor=
"#FAD195">
<td height=20 align=center><b><%String title=rs.getString(
"title");
title=new String(title.getBytes(
"ISO-8859-1"),"GB2312" );
%><%=title%>
</b></td>
</tr>
<tr>
<td valign=top>
<p><%String content=rs.getString(
"content");
content=new String(content.getBytes(
"ISO-8859-1"),"GB2312" );
%><%=content%>
</tr>

<%
}
apple.closeConn();
%>
</table>
<br><b>相关新闻:</b><ul>
</body>
</html>
lunzi   2004-11-09 20:39:05 评论:0   阅读:1396   引用:0

发表评论>>

署名发表(评论可管理,不必输入下面的姓名)

姓名:

主题:

内容: 最少15个,最长1000个字符

验证码: (如不清楚,请刷新)

Copyright@2004-2010 powered by YuLog