怎么可以选择打开本页面和打开新页面,大家看看

yaosunrise 2005-10-23 08:49:02


<%
rs.Open "Select * From list where addid="&listid, conn, 1,1
if rs.eof and rs.bof then
rs.close
else
%>
<div align="center"><br>
 <font color="#FF0000">本层下级分类:</font><br>
<%
i=0
do while not rs.eof
listid1=rs("id")
i=i+1
Set rs1= Server.CreateObject("ADODB.Recordset")
rs1.Open "Select * From list where addid = "&listid1&" order by id", conn, 1,1
Set rs2= Server.CreateObject("ADODB.Recordset")
rs2.Open "Select * From content where addid = "&listid1&" order by id", conn, 1,1
if rs1.eof and rs1.bof and rs2.eof and rs2.bof then
rs1.close
rs2.close
listlink="golink.asp"
else
rs1.close
rs2.close
listlink="show.asp"
end if
%>
<font color="#FF0000">-<a href=<%=listlink%>?id=<%=rs("id")%> target=_blank><%=rs("listname")%></a>- <br>
</font>
<%
rs.movenext
loop
rs.close
end if
%>
<br>
<br>
<%
rs.Open "Select * From content where addid="&listid&" order by id desc", conn, 1,1
if rs.eof and rs.bof then
%>
此分类下没有内容
<%rs.close%>
<%
else
if rs.recordcount=1 then
%>
<%
rs1.Open "Select * From content where addid="&listid, conn, 1,1
displaycontenttitle=rs1("title")
displaycontentpic=rs1("pic")
displaycontentpicintroduce=rs1("picintroduce")
displaycontent=rs1("content")
rs1.close
%>
</div>
<center>
<br>
<span style="font size:14px"><b><%=displaycontenttitle%></b></span>


原代码大概这样,怎么在选择show.asp是本页面打开,而golink.asp是打开一个新页面?
...全文
256 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
yaosunrise 2005-10-26
  • 打赏
  • 举报
回复
1.3楼我照你们搞了
无效啊
badfly 2005-10-24
  • 打赏
  • 举报
回复
<font color="#FF0000">-
<% if listlink=show.asp then %>
<a href=<%=listlink%>?id=<%=rs("id")%>><%=rs("listname")%></a>
<% else %>
<a href=<%=listlink%>?id=<%=rs("id")%> target=_blank><%=rs("listname")%></a>
<% end if %>
- <br>
</font>
wanghui0380 2005-10-23
  • 打赏
  • 举报
回复
请查找html语法中target标签的用法
hxyman 2005-10-23
  • 打赏
  • 举报
回复
if rs1.eof and rs1.bof and rs2.eof and rs2.bof then
rs1.close
rs2.close
listlink="target=_blank href=golink.asp"
else
rs1.close
rs2.close
listlink="href=show.asp"
end if
%>
<font color="#FF0000">-<a <%=listlink%>?id=<%=rs("id")%> ><%=rs("listname")%></a>- <br>
</font>

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧