看看以下源码,急
<tr>
<td height="15"> <script language="javascript"
src="news/1owen.asp?owen1=公司新闻&n=6"></script></td>
</tr>
这是个网站上点击某个新闻行显示的程序,请教各位大大owen1=公司新闻&n=6是什么意思??它是怎么把可点击的几条新闻行显示在页面上的??
1owen.asp的源码见下:
javastr=""
javastr=javastr+"<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"
<!--#include file="conn.asp"-->
<%
owen=request("owen")
owen1=request("owen1")
owen2=request("owen2")
n=request("n")
if n="" then
n=100
end if%>
<%
if owen1<>"" and owen2<>"" then
sql="select * from NEWS where BigClassName='"& owen1 &"' and SmallClassName='"& owen2 &"' order by id desc"
set rs=conn.execute(sql)
do while not rs.eof
%>
javastr=javastr+"<tr><td height=\"20\">"
javastr=javastr+"<img src=\'../news/images/a.gif' width='11' height='7\'> <span style=\"font-size:9pt;line-height:15pt\"><% if rs("imagenum")<>"0" then response.write "<img src='images/news.gif' border=0 alt='图片新闻'>" end if %><a href=\"/news/onews.asp?id=<%=rs("id")%>\" title=\"<%=rs("title")%> <%=rs("infotime")%>\" target=\"_blank\"><%=left(rs("title"),20)%></a></span><font color=\"#999999\" >[<%=rs("infotime")%>]</font> <font color=\"#999999\" >(阅读<font color=\"#FF0000\" ><%=rs("hits")%></font>次)</font>"
javastr=javastr+"</td></tr>"
<%n=n-1
if n<1 then exit do
rs.movenext
loop
%>
javastr=javastr+"</table>"
<%
rs.close
set rs=nothing
%>
document.write (javastr)
<%
ElseIf owen2<> "" then
sql="select * from NEWS where SmallClassName='"& owen2 &"' order by id desc"
set rs=conn.execute(sql)
do while not rs.eof
%>
javastr=javastr+"<tr><td height=\"20\">"
javastr=javastr+"<img src=\'../news/images/a.gif' width='11' height='7\'> <span style=\"font-size:9pt;line-height:15pt\"><% if rs("imagenum")<>"0" then response.write "<img src='images/news.gif' width='16' height='11' border=0 alt='图片新闻'>" end if %><a href=\"/news/onews.asp?id=<%=rs("id")%>\" title=\"<%=rs("title")%> <%=rs("infotime")%>\" target=\"_blank\"><%=left(rs("title"),20)%></a></span><font color=\"#999999\" >[<%=rs("infotime")%>]</font> <font color=\"#999999\" >(阅读<font color=\"#FF0000\" ><%=rs("hits")%></font>次)</font>"
javastr=javastr+"</td></tr>"
<%n=n-1
if n<1 then exit do
rs.movenext
loop
%>
javastr=javastr+"</table>"
<%
rs.close
set rs=nothing
%>
document.write (javastr)
<%
ElseIf owen1<>"" then
sql="select * from NEWS where BigClassName='"& owen1 &"' order by id desc"
set rs=conn.execute(sql)
do while not rs.eof
%>
javastr=javastr+"<tr><td height=\"20\">"
javastr=javastr+"<img src=\'../news/images/a.gif' width='11' height='7\'> <span style=\"font-size:9pt;line-height:15pt\"><% if rs("imagenum")<>"0" then response.write "<img src='images/news.gif' width='16' height='11' border=0 alt='图片新闻'>" end if %><a href=\"/news/onews.asp?id=<%=rs("id")%>\" title=\"<%=rs("title")%> <%=rs("infotime")%>\" target=\"_blank\"><%=left(rs("title"),20)%></a></span><font color=\"#999999\" >[<%=rs("infotime")%>]</font> <font color=\"#999999\" >(阅读<font color=\"#FF0000\" ><%=rs("hits")%></font>次)</font>"
javastr=javastr+"</td></tr>"
<%n=n-1
if n<1 then exit do
rs.movenext
loop
%>
javastr=javastr+"</table>"
<%
rs.close
set rs=nothing
%>
document.write (javastr)
<% End If %>
<%
if owen1= "" and owen2= "" then
sql="select * from NEWS order by id desc"
set rs=conn.execute(sql)
do while not rs.eof
%>
javastr=javastr+"<tr><td height=\"20\">"
javastr=javastr+"<img src=\'../news/images/a.gif' width='11' height='7\'> <span style=\"font-size:9pt;line-height:15pt\"><% if rs("imagenum")<>"0" then response.write "<img src='images/news.gif' width='16' height='11' border=0 alt='图片新闻'>" end if %><a href=\"/news/onews.asp?id=<%=rs("id")%>\" title=\"<%=rs("title")%> <%=rs("infotime")%>\" target=\"_blank\"><%=left(rs("title"),18)%></a></span><font color=\"#999999\" >[<%=rs("infotime")%>]</font> <font color=\"#999999\" >(阅读<font color=\"#FF0000\" ><%=rs("hits")%></font>次)</font>"
javastr=javastr+"</td></tr>"
<%n=n-1
if n<1 then exit do
rs.movenext
loop
%>
javastr=javastr+"</table>"
<%rs.close
set rs=nothing
conn.close
set conn=nothing%>
document.write (javastr)
<%end if%>