下面是文件list.asp的代码,看下怎么改 javastr="" javastr=javastr+"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" <!--#include file="conn.asp" --> <% num=Request.QueryString("num") if num="" then num=10 end if classid=Request.QueryString("classid") if classid<>"" then sql="select top "&num&" * from article where lanmuid="&classid&" order by id desc" else sql="select top "&num&" * from article order by id desc" end if
set rs=conn.execute(sql) do while not rs.eof %> javastr=javastr+"<tr><td>" <% title=rs("title") title=replace(title,"<","<") title=replace(title,">",">") title=replace(title,vbCrlf,"<br>") title2=left(title,30) '设置显示10个字符 if len(title2)<>len(title) then title2=title2&"......" end if if classid="" then %> javastr=javastr+"[<%=rs("date")%>]<a href=article.asp?id=<%=rs("id")%>&classid=<%=rs("lanmuid")%>><%=title%></a>"