主题:  如何实现这个程序呢?

mssw

职务:普通成员
等级:1
金币:0.0
发贴:19
#12002/11/23 21:42:21
如何实现这个程序呢?
<%
if id>50 then
%>


<%
end if
%>

如何将这段定义加到下面代码之中,产生效果为:当文章ID大于50时,便自动关掉窗口!

附:这是源文件,大家看看把那上面那个程序如何加进去?加在哪里?谢谢




<%
dim sql
dim rs
dim listname
dim strSearch
dim typename
typename="1"
set rs=server.createobject("adodb.recordset")
strSearch = Request("search")
sql="select * from learning where articleid="&request("id")

rs.open sql,conn,1,1
%>

<%=rs("title")%>






























   















<%=replace(rs("title"),strSearch,"" &

strSearch & "")%>












<%=replace(rs("content"),strSearch,"" & strSearch &

"")%>



<%rs.close
set rs=server.createobject("adodb.recordset")
sql="select * from learning where articleid="&request("id")-1
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>


>>上篇文章:已经没有了 <%else%>

>>上篇文章:
href="openarticle.asp?id=<%=rs("articleid")%>"><%=rs("title")%>
<%end if%>

<% rs.close
set rs=server.createobject("adodb.recordset")
sql="select * from learning where articleid="&request("id")+1
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>>>下篇文章:已经没有了 <%else%> >>下篇文章:

href="openarticle.asp?id=<%=rs("articleid")%>"><%=rs("title")%>
<%end if%>


width=39>









height=29 src="../../close_win.gif" width=77
border=0 alt="关闭窗口">





<%
rs.close

conn.close
set conn=nothing
%>