如何实现ASP动态页面标题?
如何实现小类—大类—网站首页标题?请详细解答,谢谢!<!--#includefile="common.asp"--><html><head><title>????</ti...
如何实现小类—大类—网站首页标题?请详细解答,谢谢!
<!--#include file="common.asp"-->
<html>
<head>
<title>????</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="<% =Site_keywords %>">
<meta name="description" content="<% =Site_description %>">
<meta name="Subject" content="<% =site_Subject %>">
<meta name="Author" content="<% =site_Author %>">
<meta name="Copyright" content="<% =site_Copyright %>">
<link href="css.css" rel="stylesheet" type="text/css" />
</head>
<%
if request("sortid")<>"" then
set rs=conn.execute("select * from product_sort where id="&Request("sortid"))
SortName=rs("SortName")
Toid=rs("Toid")
rs.close
set rs=conn.execute("select * from product_sort where id="&Toid)
SortName2=rs("SortName")
rs.close
end if
%>
<body>
<!--#include file="top.asp"-->
<table width="987" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:6px">
<tr>
<td width="205" valign="top"><!--#include file="left_sort.asp"-->
</td>
<td width="782" valign="top"><table width="782" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29" height="33" align="center"><img src="images/in06.gif" width="8" height="8" /></td>
<td width="753"><a href="index.asp"><font color="#3963CF">首页</font></a> -> 产品中心 </td>
</tr>
</table>
<% if request("sortid")<>"" and request("toid")<>"" then %>
<table width="782" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #DADADA">
<tr>
<td style="line-height:25px; padding-left:15px; padding-bottom:10px; padding-top:5px"><strong><font color="#656565">按分类选择</font></strong><br /><%sql="select * from product_sort where QType='wx' and Toid=0 order by orderno asc,id asc"
Rs.open sql,conn,1,1
do while not Rs.eof
%><img src="images/94.gif" /> <a href="products.asp?SortID=<%=rs("id")%>&ToID=<%=rs("id")%>" class="<% if cint(request("Toid"))=rs("id") then :response.write "a8":else:response.write "a6":end if %>"><%=rs("SortName")%></a>(<%= conn.execute("select count(*) from product_sort where Toid="&rs("id"))(0) %>) <%
Rs.movenext
loop
Rs.close%>
<br />
<strong><font color="#656565">按品种选择</font></strong><br />
<%sql="select * from product_sort where QType='wx' and Toid="&request("ToID")&" order by orderno asc,id asc"
Rs.open sql,conn,1,1
do while not Rs.eof
%><img src="images/94.gif" /> <a href="products.asp?SortID=<%=rs("id")%>&ToID=<%=rs("Toid")%>" class="<% if cint(request("sortid"))=rs("id") then :response.write "a9":else:response.write "a7":end if %>"><%=rs("SortName")%></a>(<%= conn.execute("select count(*) from query_products where Sortid="&rs("id"))(0) %>) <%
Rs.movenext
loop
Rs.close%></td>
</tr>
</table>
<% end if %> 展开
<!--#include file="common.asp"-->
<html>
<head>
<title>????</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="<% =Site_keywords %>">
<meta name="description" content="<% =Site_description %>">
<meta name="Subject" content="<% =site_Subject %>">
<meta name="Author" content="<% =site_Author %>">
<meta name="Copyright" content="<% =site_Copyright %>">
<link href="css.css" rel="stylesheet" type="text/css" />
</head>
<%
if request("sortid")<>"" then
set rs=conn.execute("select * from product_sort where id="&Request("sortid"))
SortName=rs("SortName")
Toid=rs("Toid")
rs.close
set rs=conn.execute("select * from product_sort where id="&Toid)
SortName2=rs("SortName")
rs.close
end if
%>
<body>
<!--#include file="top.asp"-->
<table width="987" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:6px">
<tr>
<td width="205" valign="top"><!--#include file="left_sort.asp"-->
</td>
<td width="782" valign="top"><table width="782" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29" height="33" align="center"><img src="images/in06.gif" width="8" height="8" /></td>
<td width="753"><a href="index.asp"><font color="#3963CF">首页</font></a> -> 产品中心 </td>
</tr>
</table>
<% if request("sortid")<>"" and request("toid")<>"" then %>
<table width="782" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #DADADA">
<tr>
<td style="line-height:25px; padding-left:15px; padding-bottom:10px; padding-top:5px"><strong><font color="#656565">按分类选择</font></strong><br /><%sql="select * from product_sort where QType='wx' and Toid=0 order by orderno asc,id asc"
Rs.open sql,conn,1,1
do while not Rs.eof
%><img src="images/94.gif" /> <a href="products.asp?SortID=<%=rs("id")%>&ToID=<%=rs("id")%>" class="<% if cint(request("Toid"))=rs("id") then :response.write "a8":else:response.write "a6":end if %>"><%=rs("SortName")%></a>(<%= conn.execute("select count(*) from product_sort where Toid="&rs("id"))(0) %>) <%
Rs.movenext
loop
Rs.close%>
<br />
<strong><font color="#656565">按品种选择</font></strong><br />
<%sql="select * from product_sort where QType='wx' and Toid="&request("ToID")&" order by orderno asc,id asc"
Rs.open sql,conn,1,1
do while not Rs.eof
%><img src="images/94.gif" /> <a href="products.asp?SortID=<%=rs("id")%>&ToID=<%=rs("Toid")%>" class="<% if cint(request("sortid"))=rs("id") then :response.write "a9":else:response.write "a7":end if %>"><%=rs("SortName")%></a>(<%= conn.execute("select count(*) from query_products where Sortid="&rs("id"))(0) %>) <%
Rs.movenext
loop
Rs.close%></td>
</tr>
</table>
<% end if %> 展开
展开全部
'应该这样改,你在要显示小类,大类的时候必须先把小类跟大类从数据库读出来
<!--#include file="common.asp"-->
<%
if request("sortid")<>"" then
set rs=conn.execute("select * from product_sort where id="&Request("sortid"))
SortName=rs("SortName")
Toid=rs("Toid")
rs.close
set rs=conn.execute("select * from product_sort where id="&Toid)
SortName2=rs("SortName")
rs.close
end if
%>
<html>
<head>
<title><%=SortName%>-<%=SortName2%>-网站首页标题</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="<% =Site_keywords %>">
<meta name="description" content="<% =Site_description %>">
<meta name="Subject" content="<% =site_Subject %>">
<meta name="Author" content="<% =site_Author %>">
<meta name="Copyright" content="<% =site_Copyright %>">
<link href="css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--#include file="top.asp"-->
<table width="987" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:6px">
<tr>
<td width="205" valign="top"><!--#include file="left_sort.asp"-->
</td>
<td width="782" valign="top"><table width="782" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29" height="33" align="center"><img src="images/in06.gif" width="8" height="8" /></td>
<td width="753"><a href="index.asp"><font color="#3963CF">首页</font></a> -> 产品中心 </td>
</tr>
</table>
<% if request("sortid")<>"" and request("toid")<>"" then %>
<table width="782" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #DADADA">
<tr>
<td style="line-height:25px; padding-left:15px; padding-bottom:10px; padding-top:5px"><strong><font color="#656565">按分类选择</font></strong><br /><%sql="select * from product_sort where QType='wx' and Toid=0 order by orderno asc,id asc"
Rs.open sql,conn,1,1
do while not Rs.eof
%><img src="images/94.gif" /> <a href="products.asp?SortID=<%=rs("id")%>&ToID=<%=rs("id")%>" class="<% if cint(request("Toid"))=rs("id") then :response.write "a8":else:response.write "a6":end if %>"><%=rs("SortName")%></a>(<%= conn.execute("select count(*) from product_sort where Toid="&rs("id"))(0) %>) <%
Rs.movenext
loop
Rs.close%>
<br />
<strong><font color="#656565">按品种选择</font></strong><br />
<%sql="select * from product_sort where QType='wx' and Toid="&request("ToID")&" order by orderno asc,id asc"
Rs.open sql,conn,1,1
do while not Rs.eof
%><img src="images/94.gif" /> <a href="products.asp?SortID=<%=rs("id")%>&ToID=<%=rs("Toid")%>" class="<% if cint(request("sortid"))=rs("id") then :response.write "a9":else:response.write "a7":end if %>"><%=rs("SortName")%></a>(<%= conn.execute("select count(*) from query_products where Sortid="&rs("id"))(0) %>) <%
Rs.movenext
loop
Rs.close%></td>
</tr>
</table>
<% end if %>
<!--#include file="common.asp"-->
<%
if request("sortid")<>"" then
set rs=conn.execute("select * from product_sort where id="&Request("sortid"))
SortName=rs("SortName")
Toid=rs("Toid")
rs.close
set rs=conn.execute("select * from product_sort where id="&Toid)
SortName2=rs("SortName")
rs.close
end if
%>
<html>
<head>
<title><%=SortName%>-<%=SortName2%>-网站首页标题</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="<% =Site_keywords %>">
<meta name="description" content="<% =Site_description %>">
<meta name="Subject" content="<% =site_Subject %>">
<meta name="Author" content="<% =site_Author %>">
<meta name="Copyright" content="<% =site_Copyright %>">
<link href="css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--#include file="top.asp"-->
<table width="987" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:6px">
<tr>
<td width="205" valign="top"><!--#include file="left_sort.asp"-->
</td>
<td width="782" valign="top"><table width="782" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29" height="33" align="center"><img src="images/in06.gif" width="8" height="8" /></td>
<td width="753"><a href="index.asp"><font color="#3963CF">首页</font></a> -> 产品中心 </td>
</tr>
</table>
<% if request("sortid")<>"" and request("toid")<>"" then %>
<table width="782" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #DADADA">
<tr>
<td style="line-height:25px; padding-left:15px; padding-bottom:10px; padding-top:5px"><strong><font color="#656565">按分类选择</font></strong><br /><%sql="select * from product_sort where QType='wx' and Toid=0 order by orderno asc,id asc"
Rs.open sql,conn,1,1
do while not Rs.eof
%><img src="images/94.gif" /> <a href="products.asp?SortID=<%=rs("id")%>&ToID=<%=rs("id")%>" class="<% if cint(request("Toid"))=rs("id") then :response.write "a8":else:response.write "a6":end if %>"><%=rs("SortName")%></a>(<%= conn.execute("select count(*) from product_sort where Toid="&rs("id"))(0) %>) <%
Rs.movenext
loop
Rs.close%>
<br />
<strong><font color="#656565">按品种选择</font></strong><br />
<%sql="select * from product_sort where QType='wx' and Toid="&request("ToID")&" order by orderno asc,id asc"
Rs.open sql,conn,1,1
do while not Rs.eof
%><img src="images/94.gif" /> <a href="products.asp?SortID=<%=rs("id")%>&ToID=<%=rs("Toid")%>" class="<% if cint(request("sortid"))=rs("id") then :response.write "a9":else:response.write "a7":end if %>"><%=rs("SortName")%></a>(<%= conn.execute("select count(*) from query_products where Sortid="&rs("id"))(0) %>) <%
Rs.movenext
loop
Rs.close%></td>
</tr>
</table>
<% end if %>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询