当你读出同样显示到文本框中的话,回车和空格可以保留,但是你要显示在网页中,只用通过替换,把回车换成<br /> 空格换成 等方法解决.
列如下面函数解决
'将文本框输入内容网页输入格式化
Public function TOHtmlCode(Str)
if not isnull(Str) then
TOHtmlCode = Replace(Str, CHR(13), "")
TOHtmlCode = Replace(TOHtmlCode, CHR(10) & CHR(10), "</P><P>")
TOHtmlCode = Replace(TOHtmlCode, CHR(10), "<BR>")
TOHtmlCode = Replace(TOHtmlCode, " ", " ")
end if
end function