#12004/12/22 9:15:10
<%
'转换带有换行符号文本内容的函数
'经过转换后,可使原文本中的换行符号用<br>来代替,显示的时候可自然分段
Function TransText(text)
Infonr = text
nr_len = Len(InfoNr)
InfoNr_2 = ""
For i=1 to nr_len
nr_chr = Right( Left(Infonr,i) , 1 )
IF asc(nr_chr) = 13 Then
InfoNr_2 = InfoNr_2 & "<br>"
Elseif asc(nr_chr) = 32 AND Right( Left(Infonr,i+1) , 1 ) = " " Then
InfoNr_2 = InfoNr_2 & " "
Elseif asc(nr_chr) = 32 AND Right( Left(Infonr,i+1) , 1 ) <> " " Then
InfoNr_2 = InfoNr_2 & " "
Else
InfoNr_2 = InfoNr_2 & nr_chr
End if
Next
TransText = InfoNr_2
End function
%>