ASP如何将新闻标题作为网页的标题,下面有代码,我会再加分的,谢谢
http://hi.baidu.com/qqq365968061/blog/item/dfde951ed7f330d1a7866981.html字数太多发不上来,我就把代...
http://hi.baidu.com/qqq365968061/blog/item/dfde951ed7f330d1a7866981.html 字数太多发不上来,我就把代码贴到我空间里了,麻烦高手指教小弟一下,谢谢了
展开
2个回答
展开全部
<%
id=cstr(request("id"))
Set rsnews=Server.CreateObject("ADODB.RecordSet")
sql="update news set hits=hits+1 where id="&id
conn.execute sql
sql="select * from news where id="&owen
rsnews.Open sql,conn,1,1
title=rsnews("title")
if rsnews.eof and rsnews.bof then
response.Write("数据库出错")
else
%>
<title><%=title%></title>
id=cstr(request("id"))
Set rsnews=Server.CreateObject("ADODB.RecordSet")
sql="update news set hits=hits+1 where id="&id
conn.execute sql
sql="select * from news where id="&owen
rsnews.Open sql,conn,1,1
title=rsnews("title")
if rsnews.eof and rsnews.bof then
response.Write("数据库出错")
else
%>
<title><%=title%></title>
展开全部
<%
id=cstr(request("id"))
Set rsnews=Server.CreateObject("ADODB.RecordSet")
sql="update news set hits=hits+1 where id="&id
conn.execute sql
sql="select * from news where id="&owen
rsnews.Open sql,conn,1,1
if rsnews.eof and rsnews.bof then
response.Write("数据库出错")
else
title=rsnews("title")
%>
<script language="javascript">
document.title=<%=title%>
</script>
id=cstr(request("id"))
Set rsnews=Server.CreateObject("ADODB.RecordSet")
sql="update news set hits=hits+1 where id="&id
conn.execute sql
sql="select * from news where id="&owen
rsnews.Open sql,conn,1,1
if rsnews.eof and rsnews.bof then
response.Write("数据库出错")
else
title=rsnews("title")
%>
<script language="javascript">
document.title=<%=title%>
</script>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询