页面调用script语句为何不显示内容?
hazen 2004-02-03 10:42:49 页面调用<script src="/news/newstj.asp?Show=5&BigClassName=&SmallClassName=&Max=15"></script>这个语句
但是不显示内容,不知为何?
下面为 newstj.asp 的内容,单独运行newstj.asp
显示document.write('v济南市科学技术奖励办... 0 ');
为什么在调用这个文件时就不执行呢?
<%Response.Buffer=true%>
<!--#include file="conn.asp" -->
<%
dim Show,news,Max,rs,sql,url,BigClassName,SmallClassName
url="http://" & Request.ServerVariables("SERVER_NAME") & "/"
if request.querystring("Max")="" or request.querystring("Max")=0 then
Max=10
else
Max=CINT(request.querystring("Max"))
end if
if request.querystring("Show")="" or request.querystring("Show")=0 then
Show=10
else
Show=CINT(request.querystring("Show"))
end if
BigClassName=Trim(Request.QueryString("BigClassName"))
SmallClassName=Trim(Request.QueryString("SmallClassName"))
Sql="SELECT TOP "&Show&" * FROM NEWS Where image=0 and goodnews=1"
If BigClassName<>"" Then
Sql = Sql & " and BigClassName='" & BigClassName & "'"
End If
If SmallClassName <> "" Then
Sql = Sql & " and SmallClassName='" & SmallClassName & "'"
End If
Sql = Sql & " Order By Click Desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then %>
document.write('<p align="center">暂时没有文章!</p>');
<%
else
news=1
do while not rs.eof
NewsID=rs("NewsID")
title=replace(rs("title"),"'"," ")
hit=rs("Click")
SpecialID=rs("SpecialID")
%>
document.write('<table width="100%" height="20" border="0" cellspacing="0" cellpadding="0"><TR><TD><font style='font-family:wingdings;font-size:9px'>v</font><a href="/news/ReadNews.asp?NewsID=<%=NewsID%>&BigClassName=<%=BigClassName%>&SmallClassName=<%=SmallClassName%>&SpecialID=<%=SpecialID%>" title="<%=title%>" target="_blank"><%if len(title)>Max then%><%=left(title,Max)%>...<%else%><%=title%><%end if%></a><font color="red"> <%=rs("click")%></font></TD></TR></table>');<%news=news+1
if news>Show then exit do
rs.movenext
loop
end if
Rs.Close
set Rs=nothing
%>