ASP页面标题,显示成新闻标题那样,如下面rs2("code")显示的内容,我时小白,请直接贴出如何更改,谢谢
ASP页面标题,显示成新闻标题那样,如下面rs2("code")显示的内容,我时小白,请直接贴出如何更改,谢谢<!DOCTYPEhtmlPUBLIC"-//W3C//DT...
ASP页面标题,显示成新闻标题那样,如下面rs2("code")显示的内容,我时小白,请直接贴出如何更改,谢谢
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/FORMAT.asp"-->
<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> 展开
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/FORMAT.asp"-->
<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> 展开
2个回答
展开全部
<!--#include file="inc/conn.asp"-->
//这个是连接数据库的应该在第一行
<!--#include file="inc/config.asp"-->
<!--#include file="inc/FORMAT.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from company"
rs.open sql,conn,1,3
%>
<title><%=rs("新文字段名")%></title>
其它的正常写就可以了.
//这个是连接数据库的应该在第一行
<!--#include file="inc/config.asp"-->
<!--#include file="inc/FORMAT.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from company"
rs.open sql,conn,1,3
%>
<title><%=rs("新文字段名")%></title>
其它的正常写就可以了.
追问
请问这个“新文字段名”是什么? 最底下有个“code”,这个Code出现的内容是我想在标题出现的。请问怎么改,是把company和新文字段都写成code吗?
追答
复制就可以了.
展开全部
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from company"
rs.open sql,conn,1,3
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/FORMAT.asp"-->
<head>
<!--假设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
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/FORMAT.asp"-->
<head>
<!--假设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>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询