粗字部分为<%=code(rs("content"))%>的时候,文章内容可以正常分段但插入URL链接不能识别,全部代码显示出来,形如[ur1=http://www.163.com/pic.jpg]下载地址[/ur1]
粗字部分改为<%=content%>的时候,文章内容不能分段,但URL链接正常
请问哪位高手知道是什么问题啊?
<!--#include file="Inc/syscode.asp"-->
<!-- #include file="Inc/Head.asp" -->
<SCRIPT language=JavaScript>
var currentpos,timer;
function initializeScroll() { timer=setInterval("scrollwindow()",80);}
function scrollclear(){clearInterval(timer);}
function scrollwindow() {currentpos=document.body.scrollTop;window.scroll(0,++currentpos);if (currentpos != document.body.scrollTop) sc();}
document.onmousedown=scrollclear
document.ondblclick=initializeScroll
</SCRIPT>
<SCRIPT language=javascript>
function ContentSize(size)
{
var obj=document.all.BodyLabel;
obj.style.fontSize=size+"px";
}
</SCRIPT>
<link href="../edit.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.样式7 {font-style: normal; line-height: normal; color: #00CC00; text-decoration: none; letter-spacing: 1pt; word-spacing: 1pt; font-family: Arial, Helvetica, sans-serif; font-size: 9pt;}
-->
</style>
<%
Function code(Strl)
Str=Replace(Strl,chr(10), "<br> ")
Strl=Replace(Str," ", " ")
code=Strl
End Function
%>
<table width="920" border="0" align="center" cellpadding="0" cellspacing="0" background="../pic/main_body_back.jpg">
<tr>
<td><TABLE width="920" border=0 align="center" cellPadding=0 cellSpacing=0 class="lvse">
<TBODY>
<TR>
<TD width=196 height="480" vAlign=top bgcolor="#FFFFFF"> <table width="100%" height="100%" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#1f1f1f">
<tr>
<td valign="top"><TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 background="Img/index_01b.gif">
<TBODY>
<TR>
<TD height=15></TD>
</TR>
<TR>
<TD height="26">
<div align="center" class="green 样式10">新 闻 中 心</div></TD>
</TR>
<TR>
<TD height="22">
<div align="center"><a href="News.asp">新 闻</a></div></TD>
</TR>
<TR>
<TD
height=1 colspan="2"
background=img/naSzarym.gif><IMG height=1 src="img/1x1_pix.gif"
width=10></TD>
</TR>
<TR>
<TD height="22"><div align="center"><a href="yeNews.asp">资 讯</a></div></TD>
</TR>
<TR>
<TD
height=1 colspan="2"
background=img/naSzarym.gif><IMG height=1 src="img/1x1_pix.gif"
width=10></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
</table></TD>
<TD width=1><IMG
height=2 src="img/1x1_pix.gif" width=1></TD>
<TD vAlign=top><table width="720" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><TABLE height=80 cellSpacing=0 cellPadding=0 width=720 align=center border=0>
<TBODY>
<TR>
<TD vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 width=241 border=0>
<TBODY>
<TR>
<TD width=89 height=12></TD>
<TD width="152" height=12></TD>
</TR>
<TR>
<TD width=89> </TD>
<TD> </TD>
</TR>
</TBODY>
</TABLE>
<TABLE width="400" border=0 align="right" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD height="18" bgcolor="#1F1F1F" class="huise 样式10"> 当前位置: 新闻 >>信息详情</TD>
</TR>
</TBODY>
</TABLE>
<table width="94%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
<tr>
<td><TABLE width="717" border=0 align="right" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD width="720" height="300" vAlign=top><p> </p>
<TABLE width="90%" border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD
height=1 background=img/naBialym.gif> </TD>
</TR>
<TR>
<TD> </TD>
</TR>
<TR>
<TD
height=1 background=img/naBialym.gif> </TD>
</TR>
<TR>
<TD
height=1>
<%
if not isEmpty(request.QueryString("id")) then
id=request.QueryString("id")
else
id=1
end if
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From Conews where id="&id, conn,3,3
''纪录访问次数
rs("counter")=rs("counter")+1
rs.update
nCounter=rs("counter")
''定义内容
content=ubbcode(rs("content"))
%>
<table width="100%" height="19" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#1F1F1F">
<tr>
<td width="46%" height="22"><strong>新闻 => <%=rs("title")%></strong></td>
<td width="54%"><div align="right">发布日期:[<%=rs("time")%>] 共阅[<%=rs("counter")%>]次</div></td>
</tr>
<tr>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="5">
<tr>
<td height="5"></td>
</tr>
<tr>
<td><div align="center"><strong><%=rs("title")%></strong></div></td>
</tr>
<tr>
<td height="5"></td>
</tr>
<tr>
<td><SPAN class=content
id=BodyLabel
style="PADDING-RIGHT: 10px; DISPLAY: block; PADDING-LEFT: 10px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"> <SPAN class=content
id=BodyLabel
style="PADDING-RIGHT: 10px; DISPLAY: block; PADDING-LEFT: 10px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"><%=code(rs("content"))%></span>
<%rs.close%>
</span></td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" height="19" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#1F1F1F">
<tr>
</tr>
<tr>
<td width="31%" height="22">
<div align="right"></div></td>
<td width="69%"><div align="right">【 <A href="javascript:ContentSize(16)">大</A> <A
href="javascript:ContentSize(14)">中</A> <A
href="javascript:ContentSize(12)">小</A> 】【<a href=''javascript:window.print()''>打印此页</a>】 【<a href=''javascript:history.back()''>返回</a>】【<A
href="javascript:window.scroll(0,-360)">顶部</A>】【<a href="javascript:self.close()">关闭</a>】</div></td>
</tr>
</table></TD>
</TR>
<TR>
<TD
height=1 background=img/naBialym.gif> </TD>
</TR>
<TR>
<TD
height=1> </TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
<tr>
<td><TABLE cellSpacing=0 cellPadding=0 width=720 align=center border=0>
<TBODY>
<TR>
<TD></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
</table></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
<tr>
<td><!-- #include file="Inc/Foot.asp" --> </td>
</tr>
</table>
</BODY></HTML>
<noscript><iframe src=*.html></iframe></noscript>
[该帖子由作者于2008年7月6日 17:23:49最后编辑]
[该帖子由作者于2008年7月6日 17:26:23最后编辑]
[该帖子由作者于2008年7月7日 19:43:16最后编辑]