asp网站内容页面网页标题怎么实现调用当前文章内容标题呢?
下面是我网站的内容页面代码,<head><metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/...
下面是我网站的内容页面代码,
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>深圳市乾坤家政服务部</title>
<link href="css.css" rel="stylesheet" type="text/css" />
<!--[if lte IE 6]>
<link href="css1.css" rel="stylesheet" type="text/css"/>
<![endif]-->
</head>
<body>
<!-- #include file="top.asp"-->
<table width="977" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="250" valign="top"><!-- #include file="left.asp"--></td>
<td width="16" valign="top"> </td>
<td width="709" valign="top" class="border"><table width="98%" cellspacing="0" cellpadding="0" class="tablemar">
<tr>
<td width="5%" height="26" class="titlebg"><img src="images/icon1.jpg" width="31" height="26" /></td>
<td width="88%" class="titlebg">家政资讯</td>
<td width="7%"><img src="images/title2.jpg" /></td>
</tr>
</table>
<table width="98%" cellspacing="0" cellpadding="0" class="martop1 tablemar">
<tr>
<td class="paddingmar">
<%
set News_Rs=server.CreateObject("adodb.recordset")
sql="select Hit,Id,Title,Addtime,Info from 668com_News where Id="&request("id")
News_Rs.open sql,conn,3,3
if News_Rs.eof then
Response.Write("<div align=center><br><br>资料整理中……</div>")
else
%>
<h1><%=News_Rs("Title")%></h1>
<!--相关信息-->
<div>发布时间:【<%=News_Rs("Addtime")%>】 共阅【<script language=JavaScript src="NewsCount.asp?id=<%=News_Rs("Id")%>"></script>
】次【<a href='javascript:window.print()' >打印此页</a>】
【<a href="javascript:self.close()" >关闭</a>】</div>
<!--资讯正文-->
<div id="contentnew" class="content"><%=News_Rs("Info")%></div>
<% End If %>
</td>
</tr>
</table></td>
</tr>
</table>
<!-- #include file="bottom.asp"-->
</body>
</html> 展开
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>深圳市乾坤家政服务部</title>
<link href="css.css" rel="stylesheet" type="text/css" />
<!--[if lte IE 6]>
<link href="css1.css" rel="stylesheet" type="text/css"/>
<![endif]-->
</head>
<body>
<!-- #include file="top.asp"-->
<table width="977" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="250" valign="top"><!-- #include file="left.asp"--></td>
<td width="16" valign="top"> </td>
<td width="709" valign="top" class="border"><table width="98%" cellspacing="0" cellpadding="0" class="tablemar">
<tr>
<td width="5%" height="26" class="titlebg"><img src="images/icon1.jpg" width="31" height="26" /></td>
<td width="88%" class="titlebg">家政资讯</td>
<td width="7%"><img src="images/title2.jpg" /></td>
</tr>
</table>
<table width="98%" cellspacing="0" cellpadding="0" class="martop1 tablemar">
<tr>
<td class="paddingmar">
<%
set News_Rs=server.CreateObject("adodb.recordset")
sql="select Hit,Id,Title,Addtime,Info from 668com_News where Id="&request("id")
News_Rs.open sql,conn,3,3
if News_Rs.eof then
Response.Write("<div align=center><br><br>资料整理中……</div>")
else
%>
<h1><%=News_Rs("Title")%></h1>
<!--相关信息-->
<div>发布时间:【<%=News_Rs("Addtime")%>】 共阅【<script language=JavaScript src="NewsCount.asp?id=<%=News_Rs("Id")%>"></script>
】次【<a href='javascript:window.print()' >打印此页</a>】
【<a href="javascript:self.close()" >关闭</a>】</div>
<!--资讯正文-->
<div id="contentnew" class="content"><%=News_Rs("Info")%></div>
<% End If %>
</td>
</tr>
</table></td>
</tr>
</table>
<!-- #include file="bottom.asp"-->
</body>
</html> 展开
展开全部
<%
set News_Rs=server.CreateObject("adodb.recordset")
sql="select Hit,Id,Title,Addtime,Info from 668com_News where Id="&request("id")
News_Rs.open sql,conn,3,3
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=News_Rs("Title")%></title>
<link href="css.css" rel="stylesheet" type="text/css" />
<!--[if lte IE 6]>
<link href="css1.css" rel="stylesheet" type="text/css"/>
<![endif]-->
</head>
<body>
<!-- #include file="top.asp"-->
<table width="977" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="250" valign="top"><!-- #include file="left.asp"--></td>
<td width="16" valign="top"> </td>
<td width="709" valign="top" class="border"><table width="98%" cellspacing="0" cellpadding="0" class="tablemar">
<tr>
<td width="5%" height="26" class="titlebg"><img src="images/icon1.jpg" width="31" height="26" /></td>
<td width="88%" class="titlebg">家政资讯</td>
<td width="7%"><img src="images/title2.jpg" /></td>
</tr>
</table>
<table width="98%" cellspacing="0" cellpadding="0" class="martop1 tablemar">
<tr>
<td class="paddingmar">
<%
if News_Rs.eof then
Response.Write("<div align=center><br><br>资料整理中……</div>")
else
%>
<h1><%=News_Rs("Title")%></h1>
<!--相关信息-->
<div>发布时间:【<%=News_Rs("Addtime")%>】 共阅【<script language=JavaScript src="NewsCount.asp?id=<%=News_Rs("Id")%>"></script>
】次【<a href='javascript:window.print()' >打印此页</a>】
【<a href="javascript:self.close()" >关闭</a>】</div>
<!--资讯正文-->
<div id="contentnew" class="content"><%=News_Rs("Info")%></div>
<% End If %>
</td>
</tr>
</table></td>
</tr>
</table>
<!-- #include file="bottom.asp"-->
</body>
</html>
set News_Rs=server.CreateObject("adodb.recordset")
sql="select Hit,Id,Title,Addtime,Info from 668com_News where Id="&request("id")
News_Rs.open sql,conn,3,3
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=News_Rs("Title")%></title>
<link href="css.css" rel="stylesheet" type="text/css" />
<!--[if lte IE 6]>
<link href="css1.css" rel="stylesheet" type="text/css"/>
<![endif]-->
</head>
<body>
<!-- #include file="top.asp"-->
<table width="977" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="250" valign="top"><!-- #include file="left.asp"--></td>
<td width="16" valign="top"> </td>
<td width="709" valign="top" class="border"><table width="98%" cellspacing="0" cellpadding="0" class="tablemar">
<tr>
<td width="5%" height="26" class="titlebg"><img src="images/icon1.jpg" width="31" height="26" /></td>
<td width="88%" class="titlebg">家政资讯</td>
<td width="7%"><img src="images/title2.jpg" /></td>
</tr>
</table>
<table width="98%" cellspacing="0" cellpadding="0" class="martop1 tablemar">
<tr>
<td class="paddingmar">
<%
if News_Rs.eof then
Response.Write("<div align=center><br><br>资料整理中……</div>")
else
%>
<h1><%=News_Rs("Title")%></h1>
<!--相关信息-->
<div>发布时间:【<%=News_Rs("Addtime")%>】 共阅【<script language=JavaScript src="NewsCount.asp?id=<%=News_Rs("Id")%>"></script>
】次【<a href='javascript:window.print()' >打印此页</a>】
【<a href="javascript:self.close()" >关闭</a>】</div>
<!--资讯正文-->
<div id="contentnew" class="content"><%=News_Rs("Info")%></div>
<% End If %>
</td>
</tr>
</table></td>
</tr>
</table>
<!-- #include file="bottom.asp"-->
</body>
</html>
追问
刚刚试了一下,好像还是不行呢
参考资料: http://xuliuliu.com/topics/desgin/asp-desgin/
展开全部
在<head>前面创建一个记录集Rs,然后在<title><%=Rs("title")%></title>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<%
set News_Rs=server.CreateObject("adodb.recordset")
sql="select Hit,Id,Title,Addtime,Info from 668com_News where Id="&request("id")
News_Rs.open sql,conn,3,3
if News_Rs.eof then
Response.Write("<div align=center><br><br>资料整理中……</div>")
else
%>
<script language=JavaScript>
//更改文档标题
document.title="<%=News_Rs("Title")%>";
</script>
<h1><%=News_Rs("Title")%></h1>
<!--相关信息-->
set News_Rs=server.CreateObject("adodb.recordset")
sql="select Hit,Id,Title,Addtime,Info from 668com_News where Id="&request("id")
News_Rs.open sql,conn,3,3
if News_Rs.eof then
Response.Write("<div align=center><br><br>资料整理中……</div>")
else
%>
<script language=JavaScript>
//更改文档标题
document.title="<%=News_Rs("Title")%>";
</script>
<h1><%=News_Rs("Title")%></h1>
<!--相关信息-->
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询