注册 登录
编程论坛 ASP技术论坛

怎么修改从数据库调出来的数据的行间距

shanshan610610 发布于 2008-11-24 09:09, 1201 次点击
定义的函数是Public Sub Toplist(num,field,id)
    if num = "" or field = "" then exit Sub
        if field = "week" then
            SqlT="SELECT top "& num &" Unid,Title,Nclassid,classid,pic FROM article_info where flag = 0 and DateDiff('d',intime,date())<=7 and Audit = 0 order by hits desc,title"
        else
            SqlT = "Select top "& num &" Unid,Title,Nclassid,classid,pic from article_info where flag = 0 and Audit = 0 order by "& field &" desc,title"
        end if    
    Set Rst = Conn.execute(SqlT)
    if Rst.eof and Rst.bof then
        Response.write "还没有添加文章。"
    else
        do while not Rst.eof
            Response.Write(bullet)
            if id = 1 then
                Response.Write("[<a href=2j.asp?id="& Rst(3) &"&cid="& Rst(2) &" title="& Qcdn.ReplaceP(Rst(1)) &">"& Qcdn.Classlist(Rst(2)) &"</a>] ")
            end if
            Response.Write "<a href=list.asp?unid=" & Rst(0) &" target='"& AddOpenWin &"' title="& Qcdn.ReplaceP(Rst(1)) &">" & HTMLcode(GetString(Rst(1),23)) & "</a><br>"
        Rst.movenext
        loop
    end if
    Rst.close
end Sub

首页调用语句<%Call Qcdn.Toplist("12","Unid",1)%>
只有本站会员才能查看附件,请 登录

附件里是图片,各位大哥大姐如何调整行间距????
3 回复
#2
sunfishy2008-11-24 09:40
很简单哦.你只是用了一个<br>
所以会比较密.你要是用上两个<br>就会发现宽很多了.


这个变化多种多样..

根据你的代码的话你可以修改如下:

  Response.Write "<a href=list.asp?unid=" & Rst(0) &" target='"& AddOpenWin &"' title="& Qcdn.ReplaceP(Rst(1)) &">" & HTMLcode(GetString(Rst(1),23)) & "</a><br><br>"   '这里的<br>即可控制行宽.
#3
月夜之瞳2008-11-24 11:01
不建议在数据库中调用出来 浪费数据库空间 在style="line-height:20px;"类似于这样的样式来设置
#4
shanshan6106102008-11-25 10:39
回复 第2楼 sunfishy 的帖子
谢谢,已经解决了
1