谁能帮我看看这asp代码怎么改?
我想改成每页两行,每行6项,每12项一页大家帮我看看怎么改急用谢谢了,
<form action="" method="post" name="List" id="List">
<%
SearchMaxID = Trim(Request("MaxID"))
SearchKeyword = Trim(Request("SearchKeyword"))
SearchSelect = Trim(Request("SearchSelect"))
intPageSize = 4
intCols = 1
intWidth = 180
intHeight = 110
set RsList = server.CreateObject("adodb.recordset")
SqlList = "SELECT C.ProID, C.ProModel, C.ProName, C.ProImage1, C.ProImage2, C.ProNew, C.ProContent1, C.ProContent2, A.MaxID, A.MaxName FROM ProductMax10 AS A INNER JOIN ProductList10 AS C ON A.MaxID = C.MaxID "
SqlList = SqlList + " WHERE C.ProID >= 1 "
If IsNumeric(SearchMaxID) = True And Trim(SearchMaxID) <> "" Then
SqlList = SqlList + " and A.MaxID = "&SearchMaxID&" "
End If
if SearchKeyword <> "" then
SearchKeyword = Replace( SearchKeyword, "'", "" )
Select Case SearchSelect
Case "1"
SqlList = SqlList + " and ProModel like '%"&SearchKeyword&"%' "
Case "2"
SqlList = SqlList + " and ProName like '%"&SearchKeyword&"%' "
Case "3"
SqlList = SqlList + " and ProContent1 like '%"&SearchKeyword&"%' "
Case "4"
SqlList = SqlList + " and ProContent2 like '%"&SearchKeyword&"%' "
Case Else
SqlList = SqlList + " and ProModel & ProName & ProContent1 & ProContent2 like '%"&SearchKeyword&"%' "
End Select
End If
SqlList = SqlList + " ORDER BY C.ProRank, C.ProUpdateTime DESC , C.ProID DESC "
RsList.open SqlList, objConn, 1, 1
if RsList.eof or RsList.bof then
call subListEof()
else
call subListShow()
end if
RsList.close
set RsList = nothing
%>
<%
Sub subListEof()
%>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" height="150" border="0" align="center" cellpadding="4" cellspacing="1">
<tr>
<td align="center" valign="middle">没有找到符合条件的信息记录 !</td>
</tr>
</table>
</td>
</tr>
</table>
<%
End Sub
%>
<%
Sub subListShow()
RsList.pagesize = intPageSize
page = request("page")
If IsNumeric(page) = False Then
page = 1
Else
page = cint(page)
End If
if page < 1 then page = 1
if page > RsList.pagecount then page = RsList.pagecount
RsList.absolutepage = page
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<%
for i = 1 to ( intPageSize / intCols )
%>
<table width="97%" height="110" border="0" align="center" cellpadding="4" cellspacing="1">
<tr>
<%
for j = 1 to intCols
%>
<td width="<% = Cint( 100 / intCols )%>%" align="center" valign="top">
<%
if not RsList.eof then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height=30bgcolor="#EAEFF2">
<img src="../images/arrow_grey.gif" width="13" height="11"><% = RsList("ProModel") %>
</td>
</tr>
<tr>
<td height="20"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29%" align="center">
<table border="0" align="center" cellpadding="1" cellspacing="1" onMouseOver="this.bgColor='#AAAAAA'" onMouseOut="this.bgColor='#CCCCCC'" bgcolor="#CCCCCC" width="<% = intWidth + 2 %>" height="<% = intHeight + 2 %>">
<tr>
<td align="center" bgcolor="#FFFFFF" style="padding:3px; ">
<%
if trim(RsList("ProImage1")) <> "" then
%>
<%
Set Fs = Server.CreateObject("Scripting.FileSystemObject")
IfFs.FileExists( Server.MapPath("../Admin/Product10/ProImage1/"&RsList("ProImage1"))) Then
%>
<a href="javascript:winopen('../products/proshow.asp?ID=<% = RsList("ProID") %>&MaxID=<% = RsList("MaxID") %>',600,480)" title="<% = RsList("ProModel") %>"> <img src="<%="../Admin/Product10/ProImage1/"&RsList("ProImage1")%>" width="110" height="110" border="0" align="middle" onmouseover="this.style.cursor='hand';"></a>
<%
End If
Set Fs = nothing
%>
<%
end if
%>
</td>
</tr>
</table>
</td>
<td width="71%" rowspan="2" valign="middle"><table width="100%" border="0" cellpadding="2" cellspacing="1">
<tr>
<td width="14%" align="center" class="newsBg"><strong>型号:</strong></td>
<td width="86%" class="newsBg"><a href="javascript:winopen('../products/proshow.asp?ID=<% = RsList("ProID") %>&MaxID=<% = RsList("MaxID") %>',600,480)" title="<% = RsList("ProModel") %>">
<% = RsList("ProModel") %>
</a></td>
</tr>
<tr>
<td align="center" class="newsBg"><strong>特点:</strong></td>
<td class="newsBg"><% =RsList("ProName") %></td>
</tr>
<tr>
<td align="center" class="newsBg"><strong>规格:</strong></td>
<td class="newsBg"><% =RsList("ProContent1") %></td>
</tr>
<tr>
<td align="center" class="newsBg"><strong>颜色:</strong></td>
<td class="newsBg"><% =RsList("ProContent2") %></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right"><a href="javascript:winopen('../products/proshow.asp?ID=<% = RsList("ProID") %>&MaxID=<% = RsList("MaxID") %>',600,480)" title="<% = RsList("ProModel") %>"><img src="../images/more.gif" border="0"></a></td>
</tr>
</table>
<%
RsList.movenext
end if
%>
</td>
<%
next
%>
</tr>
</table>
<%
if RsList.eof then exit for
next
%>
<table width="100%" height="42" border="0" align="center" cellpadding="4" cellspacing="1">
<tr>
<td align="center" valign="middle"><%
Call show_page2( "List","",page,RsList,"MaxID#" & (SearchMaxID) & "#SearchKeyword#" & (SearchKeyword) & "#SearchSelect#" & (SearchSelect))
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
%>
<%
End Sub
%>
</form> 现在有这页子的演示么? http://www.ald.net.cn/lls/huiri/product.asp
就像他的这样,不过我的是两行,每行6个,每页12个 i=1
do while i<7
j=1
<tr>
do while j<3
<td>
</td>
j=j+1
loop
<tr>
i=i+1
loop 加在哪部分,帮我完整加进去好吗,不大会 其它代码自己加
这个会吧 <%i=1
do while i<7
j=1%>
<tr>
<%do while j<3%>
<td>
<form action="" method="post" name="List" id="List">
<%
SearchMaxID = Trim(Request("MaxID"))
SearchKeyword = Trim(Request("SearchKeyword"))
SearchSelect = Trim(Request("SearchSelect"))
intPageSize = 4
intCols = 1
intWidth = 180
intHeight = 110
set RsList = server.CreateObject("adodb.recordset")
SqlList = "SELECT C.ProID, C.ProModel, C.ProName, C.ProImage1, C.ProImage2, C.ProNew, C.ProContent1, C.ProContent2, A.MaxID, A.MaxName FROM ProductMax10 AS A INNER JOIN ProductList10 AS C ON A.MaxID = C.MaxID "
SqlList = SqlList + " WHERE C.ProID >= 1 "
If IsNumeric(SearchMaxID) = True And Trim(SearchMaxID) <> "" Then
SqlList = SqlList + " and A.MaxID = "&SearchMaxID&" "
End If
if SearchKeyword <> "" then
SearchKeyword = Replace( SearchKeyword, "'", "" )
Select Case SearchSelect
Case "1"
SqlList = SqlList + " and ProModel like '%"&SearchKeyword&"%' "
Case "2"
SqlList = SqlList + " and ProName like '%"&SearchKeyword&"%' "
Case "3"
SqlList = SqlList + " and ProContent1 like '%"&SearchKeyword&"%' "
Case "4"
SqlList = SqlList + " and ProContent2 like '%"&SearchKeyword&"%' "
Case Else
SqlList = SqlList + " and ProModel & ProName & ProContent1 & ProContent2 like '%"&SearchKeyword&"%' "
End Select
End If
SqlList = SqlList + " ORDER BY C.ProRank, C.ProUpdateTime DESC , C.ProID DESC "
RsList.open SqlList, objConn, 1, 1
if RsList.eof or RsList.bof then
call subListEof()
else
call subListShow()
end if
RsList.close
set RsList = nothing
%>
<%
Sub subListEof()
%>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" height="150" border="0" align="center" cellpadding="4" cellspacing="1">
<tr>
<td align="center" valign="middle">没有找到符合条件的信息记录 !</td>
</tr>
</table>
</td>
</tr>
</table>
<%
End Sub
%>
<%
Sub subListShow()
RsList.pagesize = intPageSize
page = request("page")
If IsNumeric(page) = False Then
page = 1
Else
page = cint(page)
End If
if page < 1 then page = 1
if page > RsList.pagecount then page = RsList.pagecount
RsList.absolutepage = page
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<%
for i = 1 to ( intPageSize / intCols )
%>
<table width="97%" height="110" border="0" align="center" cellpadding="4" cellspacing="1">
<tr>
<%
for j = 1 to intCols
%>
<td width="<% = Cint( 100 / intCols )%>%" align="center" valign="top">
<%
if not RsList.eof then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height=30 bgcolor="#EAEFF2">
<img src="../images/arrow_grey.gif" width="13" height="11"><% = RsList("ProModel") %>
</td>
</tr>
<tr>
<td height="20"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29%" align="center">
<table border="0" align="center" cellpadding="1" cellspacing="1" onMouseOver="this.bgColor='#AAAAAA'" onMouseOut="this.bgColor='#CCCCCC'" bgcolor="#CCCCCC" width="<% = intWidth + 2 %>" height="<% = intHeight + 2 %>">
<tr>
<td align="center" bgcolor="#FFFFFF" style="padding:3px; ">
<%
if trim(RsList("ProImage1")) <> "" then
%>
<%
Set Fs = Server.CreateObject("Scripting.FileSystemObject")
If Fs.FileExists( Server.MapPath("../Admin/Product10/ProImage1/"&RsList("ProImage1"))) Then
%>
<a href="javascript:winopen('../products/proshow.asp?ID=<% = RsList("ProID") %>&MaxID=<% = RsList("MaxID") %>',600,480)" title="<% = RsList("ProModel") %>"> <img src="<%="../Admin/Product10/ProImage1/"&RsList("ProImage1")%>" width="110" height="110" border="0" align="middle" onmouseover="this.style.cursor='hand';"></a>
<%
End If
Set Fs = nothing
%>
<%
end if
%>
</td>
</tr>
</table>
</td>
<td width="71%" rowspan="2" valign="middle"><table width="100%" border="0" cellpadding="2" cellspacing="1">
<tr>
<td width="14%" align="center" class="newsBg"><strong>型号:</strong></td>
<td width="86%" class="newsBg"><a href="javascript:winopen('../products/proshow.asp?ID=<% = RsList("ProID") %>&MaxID=<% = RsList("MaxID") %>',600,480)" title="<% = RsList("ProModel") %>">
<% = RsList("ProModel") %>
</a></td>
</tr>
<tr>
<td align="center" class="newsBg"><strong>特点:</strong></td>
<td class="newsBg"><% = RsList("ProName") %></td>
</tr>
<tr>
<td align="center" class="newsBg"><strong>规格:</strong></td>
<td class="newsBg"><% = RsList("ProContent1") %></td>
</tr>
<tr>
<td align="center" class="newsBg"><strong>颜色:</strong></td>
<td class="newsBg"><% = RsList("ProContent2") %></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right"><a href="javascript:winopen('../products/proshow.asp?ID=<% = RsList("ProID") %>&MaxID=<% = RsList("MaxID") %>',600,480)" title="<% = RsList("ProModel") %>"><img src="../images/more.gif" border="0"></a></td>
</tr>
</table>
<%
RsList.movenext
end if
%>
</td>
<%
next
%>
</tr>
</table>
<%
if RsList.eof then exit for
next
%>
<table width="100%" height="42" border="0" align="center" cellpadding="4" cellspacing="1">
<tr>
<td align="center" valign="middle"><%
Call show_page2( "List","",page,RsList,"MaxID#" & (SearchMaxID) & "#SearchKeyword#" & (SearchKeyword) & "#SearchSelect#" & (SearchSelect) )
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
%>
<%
End Sub
%>
</form>
</td>
<%j=j+1
loop%>
<tr>
<%i=i+1
loop%> 非常感谢,我去试试 您要访问的网页有问题,无法显示。
--------------------------------------------------------------------------------
请尝试以下操作:
打开 www 主页,然后查找指向您感兴趣信息的链接。
单击刷新按钮,或以后再试。
单击搜索,寻找 Internet 上的信息。
也可查看相关站点列表。
HTTP 500 - 内部服务器错误
Internet Explorer
不行啊 你这段前后本来就应该还有代码你没给
页:
[1]
2