⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 56770_xp.asp

📁 本实例为一个完整的网上购物商城的完整例子程序,里面有所以的源代码.希望对大家学习有用.
💻 ASP
字号:
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<tr>
<td colspan="3" height="1" bgcolor=#CC0000>
</td></tr><tr>
<td height="23">
<table cellspacing=0 cellpadding=0 width="100%">
<tr>
<td style="padding-left:10px;padding-top:2px" width="100%" height="23" bgcolor="#FFC7C7">&nbsp;新货上架</td>
</tr>
</table>
</td><tr>
<td colspan="3" height="1" bgcolor=#CC0000></td></tr>
</tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<%
if request("sort_name")="" then
        sql="select top 9 * from 56770_product order by id DESC"
else
        sql="select top 9 * from 56770_product where sort_name='"&request("sort_name")&"' order by id DESC"
end if
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql, conn, 1, 1
do while not rs.eof
%>
<td  valign="top" width="156" align="center" rowspan="3">
<table border="0" cellspacing="1" cellpadding="0" align="center" width="190" height="45">
<tr>
<td colspan="2" height="1" width="195">&nbsp; <font color="#FF6500">
<%if len(rs("product_name"))>14 then%>
<%=left(rs("product_name"), 14)%>...
<%else%>
<%=rs("product_name")%>
<%end if%>
</font> </td>
</tr>
<tr>
<td rowspan="4" width="22" valign="top" align="center" height="59"> <a href="showproduct.asp?id=<%=rs("id")%>"><img border="0" src="pic/<%=rs("pic")%>" width="70" height="70" vspace="2" hspace="2"></a>
</td>
<td width="113" valign="top" align="left" height="9">市场价:<%=rs("sprice")%>元
</td>
</tr>
<tr>
<td width="113" valign="top" align="left" height="18">
<%if rs("cx")=true  then %>
特价:<%=rs("cprice")%>.00<imgsrc="images/tejia.gif">
<%else%>
商城价:<%=rs("price")%>.00
<%end if%>
</td>
</tr>
<tr>
<td width="124" colspan="2" height="20" align="right">
<a href="basket.asp?id=<%=rs("id")%>"><img src="IMAGES/in54_r44_c43.jpg" border="0"></a></td>
</tr>
</table>
</td>
<%
rs.movenext
if rs.eof or rs.bof then
        response.write "<td width='210'></td>"
exit do
end if
%>
<td  valign="top" width="156" align="center" rowspan="3">
<table border="0" cellspacing="1" cellpadding="0" align="center" width="190" height="45">
<tr>
<td colspan="2" height="1" width="195">&nbsp; <font color="#FF6500">
<%if len(rs("product_name"))>14 then%>
<%=left(rs("product_name"), 14)%>...
<%else%>
<%=rs("product_name")%>
<%end if%>
</font> </td>
</tr>
<tr>
<td rowspan="4" width="22" valign="top" align="center" height="59"> <a href="showproduct.asp?id=<%=rs("id")%>"><img border="0" src="pic/<%=rs("pic")%>" width="70" height="70" vspace="2" hspace="2"></a>
</td>
<td width="113" valign="top" align="left" height="9">市场价:<%=rs("sprice")%>元
</td>
</tr>
<tr>
<td width="113" valign="top" align="left" height="18">
<%if rs("cx")=true  then %>
特价:<%=rs("cprice")%>.00<imgsrc="images/tejia.gif">
<%else%>
商城价:<%=rs("price")%>.00
<%end if%>
</td>
</tr>
<tr>
<td width="124" colspan="2" height="20"  align="right">
<a href="basket.asp?id=<%=rs("id")%>"><img src="IMAGES/in54_r44_c43.jpg" border="0"></a></td>
</tr>
</table>
</td>
<%
rs.movenext
if rs.eof or rs.bof then
        response.write "<td width='210'></td>"
exit do
end if
%>

<td width="49" height="36"> </td>

<td  valign="top" width="156" rowspan="3" height="82">
<table border="0" cellspacing="1" cellpadding="0" align="center" width="190" height="83">
<tr>
<td colspan="2" height="1" width="198">&nbsp; <font color="#FF6500">
<%if len(rs("product_name"))>14 then%>
<%=left(rs("product_name"), 14)%>...
<%else%>
<%=rs("product_name")%>
<%end if%>
</font> </td>
</tr>
<tr>
<td rowspan="4" valign="top" width="8" align="center" height="59"> <a href="showproduct.asp?id=<%=rs("id")%>"><img border="0" src="pic/<%=rs("pic")%>" width="70" height="70" vspace="2" hspace="2"></a>
</td>
<td valign="top" width="113" align="left" height="12">市场价:<%=rs("sprice")%>元
</td>
</tr>
<tr>
<td valign="top" width="113" align="left" height="12">
<%if rs("cx")=true  then %>
特价:<%=rs("cprice")%>.00<imgsrc="images/tejia.gif">
<%else%>
商城价:<%=rs("price")%>.00
<%end if%>
</td>
</tr>
<tr>
<td width="124" colspan="2" height="20"  align="right">
<a href="basket.asp?id=<%=rs("id")%>"><img src="IMAGES/in54_r44_c43.jpg" border="0"></a></td>
</tr>
</table>
</td>
</tr>             <tr>
<td width="1" bgcolor="#ffffff" height="1"> </td>
</tr>
<tr>
<td width="1" bgcolor="#ffffff" height="1"> </td>
</tr>


<%
rs.movenext

loop
rs.close
%>
</table>
</td></tr>
</table>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -