找回密码
 注册
广告投放 虚位以待【阿里云】2核2G云新老同享 99元/年,续费同价做网站就用糖果主机-sugarhosts.comJtti.com-新加坡服务器,美国服务器,香港服务器
查看: 331|回复: 0

[转贴] 从数据库调出一条新闻有20个字,我只想显示8个字,后面加点

[复制链接]
发表于 2010 年 11 月 14 日 19:28:10 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×

  1. function videos(SortPath)
      dim rs,sql
      set rs = server.createobject("adodb.recordset")
      sql="select top 5 * from Qianbo_Others where ViewFlag and Instr(SortPath,'"&SortPath&"')>0 order by id desc"
      rs.open sql,conn,1,1
      if rs.eof then
            Response.Write "  <tr>"&VbCrLf
            Response.Write "    <td align=""center"" height=""28"">暂无相关信息</td>"&VbCrLf
            Response.Write "  </tr>"&VbCrLf
      else
        do while not rs.eof
                    If ISHTML = 1 Then
                            AutoLink = ""&OtherName&""&Separated&""&rs("ID")&"."&HTMLName&""
                    Else
                            AutoLink = "OtherView.asp?ID="&rs("ID")&""
                    End If
                    Response.Write "  <tr>"&VbCrLf
                    Response.Write "    <td height=""25"" style=""background:url(images/bg5.gif) repeat-x left bottom;""><img src=""images/arr4.gif"" width=""9"" height=""9"" align=""absmiddle"" /> <a href="""&AutoLink&""">"&StrLeft(rs("OthersName"),42)&"</a></td>"&VbCrLf
                    Response.Write "  </tr>"&VbCrLf
          rs.movenext
        loop
      end if
      rs.close
      set rs=nothing
    end Function
复制代码
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
效果是“某某某某某某某某某某...”按上面这段函数,应该怎么修改
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|金光论坛

GMT+8, 2025 年 2 月 2 日 07:08 , Processed in 0.025579 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表