网页中空格的显示,在线求助

birdzxy 2003-08-21 03:28:43
我有一些从数据库读出的数据,其中可能含有几个空格,但是在网页中却不能将所有的空格显示出来,于是我做了个函数如下:
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,可是为什么不对呢?
大家有什么好注意?
...全文
34 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
WQ771211 2003-08-21
  • 打赏
  • 举报
回复
用css
style="border-top-width:1pt;border-left-width:1pt;border-buttom-width:1pt;border-right-width:1pt
wandola 2003-08-21
  • 打赏
  • 举报
回复
用replace替换
同意楼上的
awaysrain 2003-08-21
  • 打赏
  • 举报
回复


 
panyee 2003-08-21
  • 打赏
  • 举报
回复
catolog = replace(catolog, " ", " ")
maxid 2003-08-21
  • 打赏
  • 举报
回复
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 & " "
else
string = string & c
end if
next

GetTrueCatlog = string
end function

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧