孕妇梦到大黄狗生什么:asp新闻发布系统信息显示的问题

来源:百度文库 编辑:高考问答 时间:2024/04/29 10:53:26
一个新闻发布系统
我在index.asp页面中调putin_news02.asp这个文件,来显示数据库的一个字段的部分内容,如果从其它地方复制内容到编辑器(如word),有时信息无法显示,但是另一个直接在本页中读取该字段的页面却显示正常.

以下为部分代码:
index.asp
...

<script language="javascript" src="/New/putin_news02.asp?class=3&
width=460&style=p9"></script> '调用putin_news02.asp
...

putin_news02.asp

<%@language="VBscript"%>
<%Response.Expires=0%>
<!--#include file="include/db_conn.asp" -->
<%
news_type=Request.QueryString("class")

if news_type="" or not isnumeric(news_type) then
Response.Write "document.write('<font color=#ffffff>参数错误!</font>');"

Response.End
end if
width=Request.QueryString("width")
style=Request.QueryString("style")

set myrs=server.CreateObject("adodb.recordset")
strSql="select content,id from t_news_purpose where newsort="&news_type
myrs.open strSql,conn,1,1

if myrs.recordcount<>0 then

response.write "document.write('<table width=" & width & " border=0 cellspacing=0 cellpadding=0 class=" & style & " align=center>');"

title_str="<tr><td color=#ffffff><a href='/New/news_detail.asp?id=" & myrs("id") & "' >"&left(replace(myrs("content"),chr(10)+chr(13),"<p>"),430)&" ...</a> </td></tr>"

response.Write "document.write(" & chr(34) & title_str & chr(34) & ");"

response.write "document.write('</table>');"
else
response.write "document.write('暂无相关信息');"
myrs.close
end if

set myrs=nothing
conn.close
set conn=nothing
%>

我怀疑应该是字符转换出的问题,但不知道怎么改,而且为什么另一个直接读取的页面只用<%=myrs("content")%>来显示都正常,而这样却不行,我是初学者,什么都不懂,大家帮我改一下啊
内容为空白,什么都没有

看看先

不太明白楼主的意思,是内容无法正常显示么?

请lz讲详细点啦,不太清楚lz讲的什么意思!