<%
set rstc9=server.createobject("ADODB.Recordset")
rstcstr9="select * from urls where check=1 "&" order by hftime desc"
rstc9.open rstcstr9,conn,1,2
p=1
while not rstc9.eof and p<9%>
<%if rstc9("site")<>"" then%>&wid=<%=rstc9("wid")%>'><%=rstc9("site")%>
<%else%>
&wid=<%=rstc9("wid")%>'><%=mid(rstc9("site"),1,2)%>
<%end if%>
if (p mod 2)=0 then
response.write("
")
end if
wend
<%
p=p+1
rstc9.movenext
rstc9.Close
set rstc9=nothing
%>
这样就行了吧,干嘛要这么多代码??
replace(你的代码,"
","<%if (p mod 2)=0 then%>
<%else%> <%end if%>")
也就是说把你的代码中的两个
换成<%if (p mod 2)=0 then%>
<%else%> <%end if%>