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>
展开
 我来答
jcnenglish
2011-08-09 · TA获得超过651个赞
知道小有建树答主
回答量:572
采纳率:0%
帮助的人:452万
展开全部
<%

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:
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式