兄弟们,救急啊,帮帮我

tantaiyizu tantaiyizu 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

'/**************************************************
' * 字符串处理类
' * 2008-6-14
' **************************************************
'**************************************************/

' <summary>
' 过滤html为text
' </summary>
'<param name="text">字符串</param>
'<param name="full">是否是过滤html标签</param>
Function HTML2Text(text ,full)
Dim temp
temp = text
temp = Replace(temp ," " ," ")
temp = Replace(temp ,Chr(10) ,"<br />")
temp = Replace(temp ,"'" ,"'")
If full <> 1 And full <> True Then
temp = Replace(temp ,"<" ,"<")
temp = Replace(temp ,">" ,">")
End If

HTML2Text = temp
End Function

' <summary>
' 还原text为html
' </summary>
'<param name="html">html数据</param>
Function Text2HTML(html)
Dim temp
temp = html
tmep = Replace(temp ,"<br />" ,Chr(10))
temp = Replace(temp ," " ," ")
temp = Replace(temp ,"'" ,"'")
temp = Replace(temp ,"<" ,"<")
temp = Replace(temp ,">" ,">")

Text2HTML = temp
End Function



我写的上述代码就是为了处理一些字符 ,可是回车和换行的时候总是不行啊 。。

大家在asp中处理回车换行有什么心得或者代码? 拿出来能分享下吗?(我用的textarea)
帮帮忙,谢谢大家了
...全文

相关推荐

评论 16
收藏 已收藏
分享
返回顶部
tantaiyizu
ASP 28,401 成员 356,940 内容