怎样在ASP文本字段里,一回车自动输入<br>换行代码…但是不显示?
2013-05-02
展开全部
你是不是希望文本域里面的内容保存时,保持输入时的格式啊?保持时使用函数转换一下 HTMLencode(request("content"))Function HTMLEncode(str)
IF(str <> "")THEN
str = Replace(str, "&", "&")
str = Replace(str, ">", ">")
str = Replace(str, "<", "<")
str = Replace(str, Chr(32), " ")
str = Replace(str, Chr(9), " ")
str = Replace(str, Chr(34), """)
str = Replace(str, Chr(39), "'")
str = Replace(str, Chr(13), "")
str = Replace(str, Chr(10) & Chr(10), "<P>")
str = Replace(str, Chr(10), "<BR>")
str = Replace(str, Chr(255), " ")
END IF
HTMLEncode = str
End Function
IF(str <> "")THEN
str = Replace(str, "&", "&")
str = Replace(str, ">", ">")
str = Replace(str, "<", "<")
str = Replace(str, Chr(32), " ")
str = Replace(str, Chr(9), " ")
str = Replace(str, Chr(34), """)
str = Replace(str, Chr(39), "'")
str = Replace(str, Chr(13), "")
str = Replace(str, Chr(10) & Chr(10), "<P>")
str = Replace(str, Chr(10), "<BR>")
str = Replace(str, Chr(255), " ")
END IF
HTMLEncode = str
End Function
2013-05-02
展开全部
知道怎么加了那还不是很简单的吗 一般可以有编辑的回答或者发贴的论坛都可以实现
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询