网页中空格的显示,在线求助
我有一些从数据库读出的数据,其中可能含有几个空格,但是在网页中却不能将所有的空格显示出来,于是我做了个函数如下:
Function GetTrueCatlog(catolog)
dim l
l = len(catolog)
dim i
dim c, string
for i = 1 to l
c = mid(catolog, i , 1)
if(trim(c) ="" ) then
string = string + "nbsp;"
else
string = string + c
end if
next
GetTrueCatlog = string
end function
想将碰到空格就加一个nbsp,可是为什么不对呢?
大家有什么好注意?