ASP这段代码如何改为一行输出两列呀
代码如下:<%FunctionGetList(Pag)ids=Request("ids")p=Cint(Request("p"))Ifp=""Orp<1Thenp=1se...
代码如下:
<%
Function GetList(Pag)
ids=Request("ids")
p=Cint(Request("p"))
If p="" Or p<1 Then p=1
set Rs=Server.CreateObject("ADODB.Recordset")
str="select id,siteTitle from Link where inp>="&inpc&" and IsVerify="&strTrue&" and webtype="&ids&" order by indate desc"
Rs.open str,Conn,1,2
If Rs.eof Then
OutStr = "暂无网站!<br/>"
Else
TotalPut=Rs.Recordcount
MaxPage=Int((TotalPut-1)/Pag)+1
If p>MaxPage Then p=MaxPage
If TotalPut > 0 Then
Rs.Move((p-1)*Pag)
dim j
j=1
do while ((Not Rs.EOF) And j<=Clng(pag))
If WapChuzhan=1 Then
OutStr = OutStr & ""&((p-1)*pag+j)&".<a href=""Wap_out.asp?ids="&ids&"&p="&p&"&id="&rs("id")&""">"&Wap.Ubb(Rs("siteTitle"))&"</a><br/>"
Else
OutStr = OutStr & ""&((p-1)*pag+j)&".<a href=""Wap_Out.asp?id="&rs("id")&""">"&Wap.Ubb(Rs("siteTitle"))&"</a><br/>"
End If
Rs.MoveNext
j=j+1
loop
End If %>
以上这段ASP代码如何改为一行输出两列呀。
呵呵,已经处理好了,谢谢。不能实现的原因是OutStr = ''<br/>''改为OutStr = OutStr & ''<br/>''就可以了。 展开
<%
Function GetList(Pag)
ids=Request("ids")
p=Cint(Request("p"))
If p="" Or p<1 Then p=1
set Rs=Server.CreateObject("ADODB.Recordset")
str="select id,siteTitle from Link where inp>="&inpc&" and IsVerify="&strTrue&" and webtype="&ids&" order by indate desc"
Rs.open str,Conn,1,2
If Rs.eof Then
OutStr = "暂无网站!<br/>"
Else
TotalPut=Rs.Recordcount
MaxPage=Int((TotalPut-1)/Pag)+1
If p>MaxPage Then p=MaxPage
If TotalPut > 0 Then
Rs.Move((p-1)*Pag)
dim j
j=1
do while ((Not Rs.EOF) And j<=Clng(pag))
If WapChuzhan=1 Then
OutStr = OutStr & ""&((p-1)*pag+j)&".<a href=""Wap_out.asp?ids="&ids&"&p="&p&"&id="&rs("id")&""">"&Wap.Ubb(Rs("siteTitle"))&"</a><br/>"
Else
OutStr = OutStr & ""&((p-1)*pag+j)&".<a href=""Wap_Out.asp?id="&rs("id")&""">"&Wap.Ubb(Rs("siteTitle"))&"</a><br/>"
End If
Rs.MoveNext
j=j+1
loop
End If %>
以上这段ASP代码如何改为一行输出两列呀。
呵呵,已经处理好了,谢谢。不能实现的原因是OutStr = ''<br/>''改为OutStr = OutStr & ''<br/>''就可以了。 展开
1个回答
展开全部
<%
Function GetList(Pag)
ids=Request(''ids'')
p=Cint(Request(''p''))
If p='''' Or p<1 Then p=1
set Rs=Server.CreateObject(''ADODB.Recordset'')
str=''select id,siteTitle from Link where inp>=''&inpc&'' and IsVerify=''&strTrue&'' and webtype=''&ids&'' order by indate desc''
Rs.open str,Conn,1,2
If Rs.eof Then
OutStr = ''暂无网站!<br/>''
Else
TotalPut=Rs.Recordcount
MaxPage=Int((TotalPut-1)/Pag)+1
If p>MaxPage Then p=MaxPage
If TotalPut > 0 Then
Rs.Move((p-1)*Pag)
dim j
j=1
do while ((Not Rs.EOF) And j<=Clng(pag))
If WapChuzhan=1 Then
OutStr = OutStr & ''''&((p-1)*pag+j)&''.<a href=''''Wap_out.asp?ids=''&ids&''&p=''&p&''&id=''&rs(''id'')&''''''>''&Wap.Ubb(Rs(''siteTitle''))&''</a> ''
Else
OutStr = OutStr & ''''&((p-1)*pag+j)&''.<a href=''''Wap_Out.asp?id=''&rs(''id'')&''''''>''&Wap.Ubb(Rs(''siteTitle''))&''</a> ''
End If
if j mod 2=0 then
OutStr = ''<br/>''
End If
Rs.MoveNext
j=j+1
loop
End If %>
Function GetList(Pag)
ids=Request(''ids'')
p=Cint(Request(''p''))
If p='''' Or p<1 Then p=1
set Rs=Server.CreateObject(''ADODB.Recordset'')
str=''select id,siteTitle from Link where inp>=''&inpc&'' and IsVerify=''&strTrue&'' and webtype=''&ids&'' order by indate desc''
Rs.open str,Conn,1,2
If Rs.eof Then
OutStr = ''暂无网站!<br/>''
Else
TotalPut=Rs.Recordcount
MaxPage=Int((TotalPut-1)/Pag)+1
If p>MaxPage Then p=MaxPage
If TotalPut > 0 Then
Rs.Move((p-1)*Pag)
dim j
j=1
do while ((Not Rs.EOF) And j<=Clng(pag))
If WapChuzhan=1 Then
OutStr = OutStr & ''''&((p-1)*pag+j)&''.<a href=''''Wap_out.asp?ids=''&ids&''&p=''&p&''&id=''&rs(''id'')&''''''>''&Wap.Ubb(Rs(''siteTitle''))&''</a> ''
Else
OutStr = OutStr & ''''&((p-1)*pag+j)&''.<a href=''''Wap_Out.asp?id=''&rs(''id'')&''''''>''&Wap.Ubb(Rs(''siteTitle''))&''</a> ''
End If
if j mod 2=0 then
OutStr = ''<br/>''
End If
Rs.MoveNext
j=j+1
loop
End If %>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询