急急急!那位高手知道如何调用数据库内容做标题
<head><metahttp-equiv="Content-Language"content="zh-cn"><metahttp-equiv="Content-Type...
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<meta name="Keywords" content= />
<meta name="Description" content= />
<LINK href="img/css.css" type=text/css rel=stylesheet>
</head>
<%
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from [news] where id="&id&""
rs.open sql,conn,1,3
rs("hit")=rs("hit")+1
rs.update
%> </td>
</tr>
<tr>
<td width="100%" colspan="2" valign="middle" align="center"><b><%=rs("bt")%></b>
<hr color="#B7002C" width="96%" size="1">
</td>
</tr>
<tr>
<td width="100%" colspan="2" valign="middle" align="center">
发布时间:<%=rs("sj")%>
浏览次数:<%=rs("hit")%></td>
</tr>
<tr>
<td width="100%" colspan="2" valign="middle" align="center">
<div align="center">
<table border="0" cellpadding="2" width="96%">
<tr>
<td width="100%">
<%
dim page
dim content
page=request.QueryString("page")
contentstr=split(rs("nr"),"$$$")
allline=ubound(contentstr)+1 '全文<br>(换行标记)总数
pagecount=int(allline) '计算总页数
Response.Write(ContentStr(page))
Response.Write("<p align='center'>")
Response.Write("共"&pagecount&"页 第"&page+1&"页 ")
if page-1>0 or page-1=0 then
Response.Write("<a href='?id="&id&"&page="&page-1&"'>上一页</a> ")
else
Response.Write("上一页 ")
end if
For p = 0 to ubound(ContentStr)
Response.Write("<a href='?id="&id&"&page="&p&"'>"&p+1&"</a> ")
Next
if page+1<pagecount then
Response.Write("<a href='?id="&id&"&page="&page+1&"'>下一页</a> ")
else
Response.Write("下一页 ")
end if
%> 展开
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<meta name="Keywords" content= />
<meta name="Description" content= />
<LINK href="img/css.css" type=text/css rel=stylesheet>
</head>
<%
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from [news] where id="&id&""
rs.open sql,conn,1,3
rs("hit")=rs("hit")+1
rs.update
%> </td>
</tr>
<tr>
<td width="100%" colspan="2" valign="middle" align="center"><b><%=rs("bt")%></b>
<hr color="#B7002C" width="96%" size="1">
</td>
</tr>
<tr>
<td width="100%" colspan="2" valign="middle" align="center">
发布时间:<%=rs("sj")%>
浏览次数:<%=rs("hit")%></td>
</tr>
<tr>
<td width="100%" colspan="2" valign="middle" align="center">
<div align="center">
<table border="0" cellpadding="2" width="96%">
<tr>
<td width="100%">
<%
dim page
dim content
page=request.QueryString("page")
contentstr=split(rs("nr"),"$$$")
allline=ubound(contentstr)+1 '全文<br>(换行标记)总数
pagecount=int(allline) '计算总页数
Response.Write(ContentStr(page))
Response.Write("<p align='center'>")
Response.Write("共"&pagecount&"页 第"&page+1&"页 ")
if page-1>0 or page-1=0 then
Response.Write("<a href='?id="&id&"&page="&page-1&"'>上一页</a> ")
else
Response.Write("上一页 ")
end if
For p = 0 to ubound(ContentStr)
Response.Write("<a href='?id="&id&"&page="&p&"'>"&p+1&"</a> ")
Next
if page+1<pagecount then
Response.Write("<a href='?id="&id&"&page="&page+1&"'>下一页</a> ")
else
Response.Write("下一页 ")
end if
%> 展开
1个回答
展开全部
<%
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from [news] where id="&id&""
rs.open sql,conn,1,3
rs("hit")=rs("hit")+1
rs.update
%>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=rs("bt")%></title>
<meta name="Keywords" content= />
<meta name="Description" content= />
<LINK href="img/css.css" type=text/css rel=stylesheet>
</head>
<body>
<table>
<tr>
<td width="100%" colspan="2" valign="middle" align="center"><b><%=rs("bt")%></b>
<hr color="#B7002C" width="96%" size="1">
</td>
</tr>
<tr>
<td width="100%" colspan="2" valign="middle" align="center">
发布时间:<%=rs("sj")%>
浏览次数:<%=rs("hit")%></td>
</tr>
.....
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from [news] where id="&id&""
rs.open sql,conn,1,3
rs("hit")=rs("hit")+1
rs.update
%>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=rs("bt")%></title>
<meta name="Keywords" content= />
<meta name="Description" content= />
<LINK href="img/css.css" type=text/css rel=stylesheet>
</head>
<body>
<table>
<tr>
<td width="100%" colspan="2" valign="middle" align="center"><b><%=rs("bt")%></b>
<hr color="#B7002C" width="96%" size="1">
</td>
</tr>
<tr>
<td width="100%" colspan="2" valign="middle" align="center">
发布时间:<%=rs("sj")%>
浏览次数:<%=rs("hit")%></td>
</tr>
.....
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询