注册 登录
编程论坛 ASP技术论坛

如何去掉空行

zfc123 发布于 2010-05-22 14:50, 1191 次点击
从数据库中读出的字段,用函数去掉html编码后,剩下的就是文本字符,但还有一个换行符,怎么样去掉,或转换成逗号。

例如:
原数据:
<p><br>sfasfasfsafasdf<br>sfasfasfasf</p><p>sfasfasfdsdf</p>

去掉html编码后:
sfasfasfsafasdf
sfasfasfdsdf

想要的样子:
sfasfasfsafasdf,sfasfasfdsdf

2 回复
#2
icecool2010-05-22 22:20
replace()
#3
zfc1232010-05-23 10:10
        str=Replace(str,Chr(13),"<br>")
        str=Replace(str,Chr(10),"<br>")
好了,谢谢
1