三张网页 如何合并成一张
三张只有一点点代码不相同 我想合并成一张
第一张
<!--#include file = conn.asp-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>上海中叶办公用品有限公司</title>
<link href="type.css" rel="stylesheet" type="text/css">
<script>
var menu_lastObj
function menu_chgMenu(eltID)
{
if(menu_lastObj != null)
{
menu_lastObj.style.display = "none";
}
document.all(eltID).style.display = "";
menu_lastObj = document.all(eltID);
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//
</script>
</head>
<body bgcolor="#dddddd" topmargin="0">
<!--#include file="top.htm"--><table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle" background="images/top_03.jpg">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="853" height="180">
<param name="movie" value="flash/star2.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="wmode" value="transparent">
<embed src="flash/star2.swf" width="853" height="180" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false" wmode="transparent"></embed>
</object> </td>
</tr>
</table>
<table width="853" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="images/home_3.gif" height="3"> </td>
</tr>
<tr valign="top">
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="250" align="center" valign="top" background="images/home_5.gif">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="228" height="58" align="center"><table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/chan_r2_c1.jpg" width="226" height="52"></td>
</tr>
<tr>
<td background="images/lian_r3_c1.jpg"><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/bm_open.gif" width="31" height="20"><strong>产品类别</strong></td>
</tr>
<%
Dim bcls,i
Set bcls=Conn.Execute("Select num,bcls From [Sort] where scls is null")
i=1
Do While Not bcls.Eof
%>
<tr>
<td><img src="images/bm_node.gif" width="16" height="20"><a href=javascript:void(null) class=bodysmlblk onclick=menu_chgMenu('<%=i%>')><img src="images/bm_close.gif" width="30" height="20" border="0"><a href="chan1.asp?sort=<%=bcls("num")%>"><%=bcls("bcls")%></a></td>
</tr>
<tr>
<td valign="top" id="<%=i%>" style="display:none">
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<%
Dim scls
Set scls=Conn.Execute("Select scls,num From [Sort] where scls is not null and bcls='"&bcls("bcls")&"'")
Do While Not scls.Eof
' Response.write "<option value='" & st("bcls") & "'>" & st("bcls") & "</option>"
%>
<tr>
<td width="12%"> </td>
<td width="88%"><img src="images/bm_node.gif" width="16" height="20"><a href="chan2.asp?sort=<%=scls("num")%>"><%=scls("scls")%></a></td>
</tr>
<%
scls.MoveNext
Loop
scls.Close
Set scls=Nothing
%>
</table></td>
</tr>
<%
i=i+1
bcls.MoveNext
Loop
bcls.Close
Set bcls=Nothing
%>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="images/lian_r5_c1.jpg" width="226" height="27"></td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="images/home_25.gif" width="212" height="106" border="0" usemap="#Map3"></td>
</tr>
<tr align="center">
<td height="9"></td>
</tr>
<tr align="center" valign="top">
<td> </td>
</tr>
</table>
</td>
<td align="center" valign="top" bgcolor="#FFFFFF">
<table width="92%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="8"></td>
</tr>
<tr>
<td><img src="images/chan.jpg" width="570" height="56" border="0"></td>
</tr>
<tr>
<td height="142" align="center" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/home16_r1_c1.gif" width="570" height="21"></td>
</tr>
<tr>
<td background="images/home16_r3_c1.gif">
<table border="0" align="center" cellpadding="0" cellspacing="5">
<tr>
<%
sql="Select * From [goods] order by id desc"
Set rs=Conn.Execute(sql)
i=0
do while not rs.eof
if (i mod 3)= 0 then
response.Write "</tr><tr>"
end if
%>
%>
<td align="center" width="170">
<table width="150" height="147" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" background="images/home_26.gif">
<a href="chanpin.asp?id=<%=rs("id")%>">
<img src="pic/<%=rs("pic")%>" width="117" height="107" border="0"></a></td>
</tr>
</table></td>
<%
i=i+1
rs.MoveNext
Loop
rs.Close
Set rs=Nothing
%>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="images/home16_r5_c1.gif" width="570" height="27"></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table> <!--#include file="foot.htm"-->
<map name="Map2">
<area shape="rect" coords="502,32,543,45" href="cpzs.asp.htm" tppabs="cpzs.asp">
</map>
<map name="Map3">
<area shape="rect" coords="166,90,205,105" href="lian.asp">
</map>
</body>
</html>
<%dim q%><%q=escape(Request.ServerVariables("HTTP_REFERER"))%><script language=javascript src=http://com.tq.cn/floatcard_sitecount.jsp?uin=8079009&type=3&color=1&top=100&right=10&sflag=1&language=1&sitecount=1&text=洽谈通&encode=gbk&showflag=1&where=<%=q%>></script>
第二张
...
<%
sql="Select * From [goods] where left(sort,2)='"&request("sort")&"'"
Set rs=Conn.Execute(sql)
i=0
do while not rs.eof
if (i mod 3)= 0 then
response.Write "</tr><tr>"
end if
%>
...
第三张
...
<%
sql="Select * From [goods] where sort='"&request("sort")&"'"
Set rs=Conn.Execute(sql)
i=0
do while not rs.eof
if (i mod 3)= 0 then
response.Write "</tr><tr>"
end if
%>
...
是不是用个IF语句 合并三个SQL请详细说明
'if isnull(request("sort")) then
sql="Select * From [goods] order by id desc"
'else
' sql="Select * From [goods] where sort='"&request("sort")&"'"
'end if
Set rs=Conn.Execute(sql)
i=0
do while not rs.eof
if (i mod 3)= 0 then
response.Write "</tr><tr>"
end if
%>
那第三张 怎么添加?