| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 405 人关注过本帖
标题:asp的表格显示问题‘
只看楼主 加入收藏
子墨
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2006-2-23
收藏
 问题点数:0 回复次数:1 
asp的表格显示问题‘

后台文章发布,发表格后表格显示正常,但显示页面文章标题和表格距离很大,如果发的是纯文字就没有距离,如果发表格就距离很大,察看源文件时,每一个<td>后总生成一个<br>,我的输出叶面有个html过滤,谁能帮我改改,以解决这个问题,谢谢!

'==================================================
' 函数名:inhtml(strhtml,en),outhtml(strhtml),delhtml(strhtml)
' 作 用:html过滤
' 参 数:strhtml
'==================================================
dim character_A
character_A = "|<|>|chr(32)|chr(9)|chr(34)|chr(39)|chr(13)|chr(10)&chr(10)||&nbsp;"
character_A = split(character_A,"|")
dim character_B
character_B = "|&lt;|&gt;|&nbsp;| |&quot;|&#39;|&amp;nbsp;|&lt;/p&gt;&lt;p&gt;|&lt;br /&gt;|&nbsp;"
character_B = split(character_B,"|")
dim character_C
character_C = "|<|>| | |&quot;|'| |</p><p>|<br />| "
character_C = split(character_C,"|")
dim character_cn
character_cn = "|‘|’|“|”"
character_cn = character_cn & "|,|。|!|?|:|;|、"
character_cn = character_cn & "|(|)|【|】|『|』|《|》"
character_cn = character_cn & "|+|-|×|÷"
character_cn = character_cn & "|~|◎|#|¥|%|……|※|——|§"
character_cn = split(character_cn,"|")
dim character_en
character_en = "|&#39;|&#39;|&quot;|&quot;&quot;"
character_en = character_en & "|,|.|!|?|:|;|,"
character_en = character_en & "|(|)|[|]|{|}|&lt;|&gt;&nbsp;"
character_en = character_en & "|+|-|*|\"
character_en = character_en & "|~|@|#|$|%|^|&|-|\"
character_en = split(character_en,"|")
'=======
''
'inhtml(strhtml,0)
'
function inhtml(strhtml,en)
if not isnull(strhtml) then
strhtml = trim(strhtml)
for i = 1 to UBound(character_A)
strhtml = replace(strhtml, character_A(i), character_B(i))
next
if int(en)=1 then '转换成英文字符
for i = 1 to UBound(character_cn)
strhtml = replace(strhtml, character_cn(i), character_en(i))
next
end if
strhtml = replace(strhtml, "&lt;p align=&quot;left&quot;&gt;", "&lt;p&gt;")
inhtml = strhtml
end if
end function

function outhtml(strhtml)
if not isnull(strhtml) then
strhtml = trim(strhtml)
for i = 1 to UBound(character_B)
strhtml = replace(strhtml, character_B(i), character_C(i))
next
outhtml = strhtml
end if
end function

function delhtml(strhtml)
dim objregexp, stroutput
set objregexp = new regexp
objregexp.ignorecase = true
objregexp.global = true
objregexp.pattern = "(<[a-za-z].*?>)|(<[\/][a-za-z].*?>)"
stroutput = objregexp.replace(strhtml, "")
stroutput = replace(stroutput, "<", "&lt;")
stroutput = replace(stroutput, ">", "&gt;")
delhtml = stroutput
set objregexp = nothing
end function

搜索更多相关主题的帖子: 表格 asp 
2006-05-22 15:19
hb007
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-5-18
收藏
得分:0 

好难,偶是菜鸟,汗一个。。。。

2006-05-22 19:19
快速回复:asp的表格显示问题‘
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016601 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved