主题:  怎么样让他超过我限制的字符的时后出.......

现在设计

职务:普通成员
等级:2
金币:10.0
发贴:538
注册:2001/8/3 8:32:32
#12002/5/23 20:12:00
原文件
str=""
<%
function invert(str)
invert=replace(replace(replace(replace(str,"<","<"),">",">"),"
","")," "," ")
end function
%>    
<%
dim conn
dim connstr
on error resume next
connstr="DBQ="+server.mappath("admin/news.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
%>
<%
kind=request("kind")
typeid=request("typeid")
n=trim(request("n"))
if n="" or IsNumeric(n)=false then
n=7
end if
set rs=server.createobject("adodb.recordset")
if kind="img" then
if typeid="" or IsNumeric(typeid)=false then
     sql="select top 1 * from xinwen where imgcount<>0 order by newsid DESC"
    else
     sql="select top 1 * from xinwen where type='" & cstr(typeid) & "' and imgcount<>0 order by newsid DESC"
    end if
end if
if kind="hot" then
     if typeid="" or IsNumeric(typeid)=false then
sql="select top " & n & " * from xinwen order by hits DESC"
        else
         sql="select top " & n & " * from xinwen where type='" & cstr(typeid) & "' order by hits DESC"
        end if
end if
if kind="" then
if typeid="" or IsNumeric(typeid)=false then    
         sql="select top " & n & " * from xinwen order by newsid DESC"
        else
         sql="select top " & n & " * from xinwen where type='" & cstr(typeid) & "' order by newsid DESC"        
end if
end if
rs.open sql,conn,1,1
if not rs.eof and not rs.bof then
    if kind="img" then
    %>
str=str + ""
<% else %>
str=str + ""
<% end if
end if
rs.close
set rs=nothing
%>


str=str+ "
<%=trim(rs("title"))%>
<%=rs("title")%>
"
     <% do while not rs.eof %>
str=str+"
  • \" target=_blank><%if cstr(rs("imgcount")) <>0 then %>[图文]<%end if %><%=trim(rs("title"))%>(<%theday=cstr(MONTH(rs("ntime")))&"."&cstr(DAY(rs("ntime")))
    response.write theday%>)
    <%if month(cdate(trim(rs("ntime"))))=month(now()) and clng(day(cdate(trim(rs("ntime"))))+1)>=clng(day(now())) then %><% end if %>"
    <% rs.movenext
         loop %>
    str=str + "
  • "
    document.write (str)