asp代码输出一行2列 50
<%Setrs=Server.CreateObject("ADODB.Recordset")rs.Opensql,conn,1,1ifnotrs.eofthenrs.Pa...
<%
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql,conn,1,1
if not rs.eof then
rs.PageSize = rs_parameter("ex_list")
page=Request.QueryString("page")
If page="" Then page = 1
If not isnumeric(page) Then page = 1
page = Clng(page)
If page>rs.PageCount Then page=rs.PageCount
If page<=0 Then page=1
rs.AbsolutePage=page
for i=1 to rs_parameter("ex_list")
if rs.eof Then exit For
'If i Mod 2 =0 Then
'response.write "<tr bgcolor=""#FFFFFB"">"
'Else
'response.write "<tr bgcolor=""#FDFAE7"">"
'End If
%> 展开
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql,conn,1,1
if not rs.eof then
rs.PageSize = rs_parameter("ex_list")
page=Request.QueryString("page")
If page="" Then page = 1
If not isnumeric(page) Then page = 1
page = Clng(page)
If page>rs.PageCount Then page=rs.PageCount
If page<=0 Then page=1
rs.AbsolutePage=page
for i=1 to rs_parameter("ex_list")
if rs.eof Then exit For
'If i Mod 2 =0 Then
'response.write "<tr bgcolor=""#FFFFFB"">"
'Else
'response.write "<tr bgcolor=""#FDFAE7"">"
'End If
%> 展开
展开全部
tr代表一行,td是列,修改代码如下
response.write "<table>"
response.write "<tr>"
If i Mod 2 =0 Then
response.write "<td bgcolor=""#FFFFFB""></td>"
Else
response.write "<td bgcolor=""#FDFAE7""></td>"
End If
response.write "</tr>"
response.write "</table>"
response.write "<table>"
response.write "<tr>"
If i Mod 2 =0 Then
response.write "<td bgcolor=""#FFFFFB""></td>"
Else
response.write "<td bgcolor=""#FDFAE7""></td>"
End If
response.write "</tr>"
response.write "</table>"
追问
谢谢啊 但是试了好像不行哦
追答
我只是根据你的要求写个例子,要直接可以用的,代码如下
response.write ""
for i=1 to rs_parameter("ex_list")/2
if rs.eof Then exit For
response.write ""
response.write "11"
rs.movenext
if rs.eof Then exit For
response.write "22"
response.write ""
rs.movenext
next
response.write ""
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询