ASP页面标题,显示成新闻标题那样,如下面rs2("code")显示的内容,我时小白,请直接贴出如何更改,谢谢
<head><title>Description-BestSellerofdvdrw,GT40N,GT32N,GSA-T50N,externaldvdburner,blu...
<head>
<title>Description-Best Seller of dvd rw,GT40N,GT32N,GSA-T50N,external dvd burner,bluray player</title>
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from company"
rs.open sql,conn,1,3
%>
<%
dim id,prename,company,intro,predate,graph2,description,remarks,price,rs2,strSorts,strCategory,YourPrice
'id=SafeRequest("id",1)
id=request.QueryString("id")
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from product where id="&id,conn,1,3
if rs2.eof and rs2.bof then
response.Write "<script language='javascript'>alert('查无此记录,请正确操作!');history.go(-1);</script>"
response.End
end if
rs2("viewnum")=rs2("viewnum")+1
rs2.update
IntCatID = rs2("categoryid")
IntCatIDLong=IntCatID
set rs=server.CreateObject("adodb.recordset")
do while not IntCatID = 0
rs.open "Select categoryid,category,ParentID From category Where categoryid="&IntCatID,conn,1,1
if rs.eof and rs.bof then
response.Write "<script LANGUAGE='javascript'>alert('您输入的参数非法,请正确操作!');history.go(-1);</script>"
rs.close
set rs = Nothing
conn.Close
set conn=nothing
response.end
end if
strCategory = "<a href=product.asp?catid="&rs("categoryid")&">"&rs("category")&"</a>>>"&strCategory
TitleCategory = TitleCategory&""&rs("category")&">>"
IntCatID = rs("ParentID")
IntCatIDLong=CStr(IntCatIDLong)&","&CStr(rs("ParentID"))
rs.close
loop
set rs = nothing
%>
<div class="classdiv84"><a href="<%=rs2("spic")%>" target="_blank"><img src="<%=rs2("spic")%>" hspace="10" vspace="10" HEIGHT="160" border="0" /></a></div>
<div class="classdiv84" style="padding-left:30PX;">
<div class="classdiv61"><B>Product: </B><%=rs2("name")%></div><BR>
<div class="classdiv61"><B>Model: </B><%=rs2("code")%></div><BR> 展开
<title>Description-Best Seller of dvd rw,GT40N,GT32N,GSA-T50N,external dvd burner,bluray player</title>
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from company"
rs.open sql,conn,1,3
%>
<%
dim id,prename,company,intro,predate,graph2,description,remarks,price,rs2,strSorts,strCategory,YourPrice
'id=SafeRequest("id",1)
id=request.QueryString("id")
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from product where id="&id,conn,1,3
if rs2.eof and rs2.bof then
response.Write "<script language='javascript'>alert('查无此记录,请正确操作!');history.go(-1);</script>"
response.End
end if
rs2("viewnum")=rs2("viewnum")+1
rs2.update
IntCatID = rs2("categoryid")
IntCatIDLong=IntCatID
set rs=server.CreateObject("adodb.recordset")
do while not IntCatID = 0
rs.open "Select categoryid,category,ParentID From category Where categoryid="&IntCatID,conn,1,1
if rs.eof and rs.bof then
response.Write "<script LANGUAGE='javascript'>alert('您输入的参数非法,请正确操作!');history.go(-1);</script>"
rs.close
set rs = Nothing
conn.Close
set conn=nothing
response.end
end if
strCategory = "<a href=product.asp?catid="&rs("categoryid")&">"&rs("category")&"</a>>>"&strCategory
TitleCategory = TitleCategory&""&rs("category")&">>"
IntCatID = rs("ParentID")
IntCatIDLong=CStr(IntCatIDLong)&","&CStr(rs("ParentID"))
rs.close
loop
set rs = nothing
%>
<div class="classdiv84"><a href="<%=rs2("spic")%>" target="_blank"><img src="<%=rs2("spic")%>" hspace="10" vspace="10" HEIGHT="160" border="0" /></a></div>
<div class="classdiv84" style="padding-left:30PX;">
<div class="classdiv61"><B>Product: </B><%=rs2("name")%></div><BR>
<div class="classdiv61"><B>Model: </B><%=rs2("code")%></div><BR> 展开
1个回答
展开全部
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from company"
rs.open sql,conn,1,3
%>
<head>
<!--此处假设rs("company")表示标题,将company改成表示标题的字段名即可-->
<title><%=rs("company")%></title>
<%
dim id,prename,company,intro,predate,graph2,description,remarks,price,rs2,strSorts,strCategory,YourPrice
'id=SafeRequest("id",1)
id=request.QueryString("id")
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from product where id="&id,conn,1,3
if rs2.eof and rs2.bof then
response.Write "<script language='javascript'>alert('查无此记录,请正确操作!');history.go(-1);</script>"
response.End
end if
rs2("viewnum")=rs2("viewnum")+1
rs2.update
IntCatID = rs2("categoryid")
IntCatIDLong=IntCatID
set rs=server.CreateObject("adodb.recordset")
do while not IntCatID = 0
rs.open "Select categoryid,category,ParentID From category Where categoryid="&IntCatID,conn,1,1
if rs.eof and rs.bof then
response.Write "<script LANGUAGE='javascript'>alert('您输入的参数非法,请正确操作!');history.go(-1);</script>"
rs.close
set rs = Nothing
conn.Close
set conn=nothing
response.end
end if
strCategory = "<a href=product.asp?catid="&rs("categoryid")&">"&rs("category")&"</a>>>"&strCategory
TitleCategory = TitleCategory&""&rs("category")&">>"
IntCatID = rs("ParentID")
IntCatIDLong=CStr(IntCatIDLong)&","&CStr(rs("ParentID"))
rs.close
loop
set rs = nothing
%>
<div class="classdiv84"><a href="<%=rs2("spic")%>" target="_blank"><img src="<%=rs2("spic")%>" hspace="10" vspace="10" HEIGHT="160" border="0" /></a></div>
<div class="classdiv84" style="padding-left:30PX;">
<div class="classdiv61"><B>Product: </B><%=rs2("name")%></div><BR>
<div class="classdiv61"><B>Model: </B><%=rs2("code")%></div><BR>
set rs=server.CreateObject("adodb.recordset")
sql="select * from company"
rs.open sql,conn,1,3
%>
<head>
<!--此处假设rs("company")表示标题,将company改成表示标题的字段名即可-->
<title><%=rs("company")%></title>
<%
dim id,prename,company,intro,predate,graph2,description,remarks,price,rs2,strSorts,strCategory,YourPrice
'id=SafeRequest("id",1)
id=request.QueryString("id")
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from product where id="&id,conn,1,3
if rs2.eof and rs2.bof then
response.Write "<script language='javascript'>alert('查无此记录,请正确操作!');history.go(-1);</script>"
response.End
end if
rs2("viewnum")=rs2("viewnum")+1
rs2.update
IntCatID = rs2("categoryid")
IntCatIDLong=IntCatID
set rs=server.CreateObject("adodb.recordset")
do while not IntCatID = 0
rs.open "Select categoryid,category,ParentID From category Where categoryid="&IntCatID,conn,1,1
if rs.eof and rs.bof then
response.Write "<script LANGUAGE='javascript'>alert('您输入的参数非法,请正确操作!');history.go(-1);</script>"
rs.close
set rs = Nothing
conn.Close
set conn=nothing
response.end
end if
strCategory = "<a href=product.asp?catid="&rs("categoryid")&">"&rs("category")&"</a>>>"&strCategory
TitleCategory = TitleCategory&""&rs("category")&">>"
IntCatID = rs("ParentID")
IntCatIDLong=CStr(IntCatIDLong)&","&CStr(rs("ParentID"))
rs.close
loop
set rs = nothing
%>
<div class="classdiv84"><a href="<%=rs2("spic")%>" target="_blank"><img src="<%=rs2("spic")%>" hspace="10" vspace="10" HEIGHT="160" border="0" /></a></div>
<div class="classdiv84" style="padding-left:30PX;">
<div class="classdiv61"><B>Product: </B><%=rs2("name")%></div><BR>
<div class="classdiv61"><B>Model: </B><%=rs2("code")%></div><BR>
追问
我不太明白, 首先,我想在标题那里显示页面里面的内容,注意下面有一个Model: 这个在页面里会出现不同的信息,我现在要让标题也出现CODE的内容,所以,我感觉你说的不对。老大,帮忙再看看啊。
追答
alert('查无此记录,请正确操作!');history.go(-1);"
response.End
end if
rs2("viewnum")=rs2("viewnum")+1
rs2.update
IntCatID = rs2("categoryid")
IntCatIDLong=IntCatID
set rs=server.CreateObject("adodb.recordset")
do while not IntCatID = 0
rs.open "Select categoryid,category,ParentID From category Where categoryid="&IntCatID,conn,1,1
if rs.eof and rs.bof then
response.Write "alert('您输入的参数非法,请正确操作!');history.go(-1);"
rs.close
set rs = Nothing
conn.Close
set conn=nothing
response.end
end if
strCategory = ""&rs("category")&">>"&strCategory
TitleCategory = TitleCategory&""&rs("category")&">>"
IntCatID = rs("ParentID")
IntCatIDLong=CStr(IntCatIDLong)&","&CStr(rs("ParentID"))
rs.close
loop
set rs = nothing
%>
" target="_blank">" hspace="10" vspace="10" HEIGHT="160" border="0" />
Product:
Model:
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询