可以帮我解析一下这段代码嘛???

来源:百度知道 编辑:UC知道 时间:2024/06/09 00:20:24
javastr=""
javastr=javastr+"<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"
<!--#include file="conn.asp"-->
<%
dy=request("dy")
dy1=request("dy1")
dy2=request("dy2")
n=request("n")
if n="" then
n=100
end if%>

<%
if dy1<>"" and dy2<>"" then
sql="select * from NEWS where BigClassName='"& dy1 &"' and SmallClassName='"& dy2 &"' order by id desc"
set rs=conn.execute(sql)
do while not rs.eof
%>
javastr=javastr+"<tr><td height=\"19\" >"
javastr=javastr+"<img src='images/b.gif' border=0> <span style=\"font-size:9pt;line-height:15pt\">&l

太多了 我不一一解释了 意思就是根据传回的新闻的大类和小类,去数据表news里面读取
他的模式是用document.write,而不是正常的response.write。就是使用前台脚本输出,而不是后台动态输出。这样的效率较高 当然这个js也是动态生成的