[求助]只显示前面的十几个字,超过就用...表示,请问怎么改呀!先谢谢!
只显示前面的十几个字,超过就用...表示,请问怎么改呀!先谢谢!
<%
num=request("num")
if num="" then num="5"
if not isnumeric(num) then response.end
set conn=server.createobject("adodb.connection")
conn.open connstr
%>
<%
set rs=server.createobject("adodb.recordset")
c=request("class")
sc=trim(request("sc"))
if sc<>"0" and sc<>"asc" and sc<>"desc" then response.end
if sc="0" then
if c="" then
rs.open "select * from wz order by id desc",conn,1,1
else
rs.open "select * from wz where class='"&c&"' order by id desc",conn,1,1
end if
else
if c="" then
rs.open "select * from wz order by count "&sc&"",conn,1,1
else
rs.open "select * from wz where class='"&c&"' order by count "&sc&"",conn,1,1
end if
end if
count=rs.recordcount
if rs.eof then
%>
document.write("没有符合条件的资料")
<%
response.end
end if
%>
document.write("<table width=<%=request("width")%> height=<%=request("height")%> align=center border=0 >")
<%
for i=1 to num
if rs.eof then exit for
%>
document.write ("<tr><td valign=top>")
<% if request("class")<>"" then %>
document.write ("<img src=../images/article_ontop.gif> <a title=发表时间:<%=rs("date")%> target=_blank href=<%=path%>/data/<%=rs("num")%>.html><% =rs("title") %></a></tr>")
<% end if %>
<%
rs.movenext
next
conn.close
%>
document.write("</table>")
<% =rs("title") %>
上面的变量,只显示前面的十几个字,超过就用...表示,请问怎么改呀!先谢谢!