想实现留言如果有换行的话,那么显示的时候也有换行.

boy7420 2004-12-03 03:10:11
我做的留言本,想实现留言时是什么样子,显示时还是什么样子
咋实现?
见笑了!
...全文
51 点赞 收藏 4
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
love751314 2004-12-03
看来我只有帮忙顶一下了!
回复
boy7420 2004-12-03
谢谢两位.
回复
888228 2004-12-03
我也送你个~


Function ReplaceStr(Str)
Str=Trim(Str)
Str=Replace(Str,"'","'")
Str=Replace(Str,";",";")
Str=Replace(Str," "," ")
Str=Replace(Str,"""","”")
Str=Replace(Str,"%","")
Str=Replace(Str,"__","")
Str=Replace(Str,"--","--")
Str=Replace(Str,"\","\")
Str=Replace(Str,"?","")
Str=Replace(Str,vbcrlf,"<br>")
ReplaceStr=Str
End Function
回复
lienzhu 2004-12-03
显示时通过下面函数转换一下

function HTMLEncode(fString)
if isnull(fString) then
HTMLEncode =""
exit function
end if
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = Replace(fString, CHR(32), " ")
fString = Replace(fString, CHR(9), " ")
fString = Replace(fString, CHR(34), """)
fString = Replace(fString, CHR(39), "'")
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
fString = Replace(fString, CHR(10), "<BR> ")
HTMLEncode = fString
end function
回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2004-12-03 03:10
社区公告
暂无公告