html代码在前台显示的问题,请教

aspgreener 2006-08-30 01:51:14
我的是NB的文章管理系统,现在的问题是他的公告不能显示含有html代码的内容,只能显示纯文本的内容

代码如下:

<!--#include file="Conn.asp" -->
<!--#include file="Include/Inc.asp" -->
<%
Dim PostId
Dim Title,Content,AddTime
PostId=SafeRequest("postid",1)

If PostId<>"" Then
SQL="Select Title,Content,AddTime From [NB_Placard] Where Id="&PostId
Set Rs=Conn.Execute(SQL)
If Not rs.eof And Not rs.bof Then
Title=Rs(0)
Content=Rs(1)
AddTime=Rs(2)
End If
End If
%>
<html>
<head>
<title><%=SysInfo(0)%> - 站点公告</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
body
{
background-attachment: fixed;
background-repeat: repeat-y;
background-position: center;
background-color: #FFFFFF;
font-family: "宋体";
font-size: 12px;
}
a {
color: #000000;
text-decoration: none;
}
a:hover {
color: #999999;
text-decoration: underline;
}
TD {
font-family: "宋体";
font-size: 12px;
}
TR {
font-family: "宋体";
font-size: 12px;
}
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellpadding="5" cellspacing="0" align="center" style="border: 1 solid #000000">
<tr bgcolor="#efefef" valign="middle">
<td align="left" width="70%"><%=Title%></td>
<td align="center"><%=FormatDateTime(AddTime,2)%></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="2"><%=HTMLEncode(Content)%></td>
</tr>
<tr>
<td bgcolor="#efefef" colspan="2" align="center"><a href="javascript:window.close();">关闭窗口</a> | <a href="moreplacard.asp">更多公告</a></td>
</tr>
</table>
</body>
</html>


请教如何修改?
...全文
123 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
aspgreener 2006-08-30
  • 打赏
  • 举报
回复
找到原因了,htmlencode函数的问题,数据库里字段里的标签不需要转换了
aspgreener 2006-08-30
  • 打赏
  • 举报
回复
谁用过NB 文章管理系统的,帮帮我,你们遇到这样的情况吗?
pcworld 2006-08-30
  • 打赏
  • 举报
回复
应该不会的

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧