问一个非常简单的问题,在线等待。。。。
请问如何让数据库中的一个字段的内容按HTML代码格式显示出来
如left(rs( "art_title "),9)这是截取该字段前9位。谢谢
------解决方案-------------------- <%
Response.write dvHTMLCode(rs( "art_title "))
function dvHTMLCode(byval fString)
Dim sTempValue
sTempValue = fString
if isnull(sTempValue) or trim(sTempValue)= " " then
dvHTMLCode= " "
exit function
end if
sTempValue = replace(sTempValue, "> ", "> ")
sTempValue = replace(sTempValue, "< ", " < ")
sTempValue = Replace(sTempValue, " ", " ")
sTempValue = Replace(sTempValue, "" ", CHR(34))
sTempValue = Replace(sTempValue, "' ", CHR(39))
sTempValue = Replace(sTempValue, " </P> <P> ",CHR(10) & CHR(10))
sTempValue = Replace(sTempValue, " <BR> ", CHR(10))
dvHTMLCode = sTempValue
end function
%>