article.hbdx.com.cn/paihang.asp?num=10&titlelen=15这是我的调用最新文章的文件,在IE里输入可以显示内容.
<script src="http://article.hbdx.com.cn/paihang.asp?num=10&titlelen=15"></script>
这是在首页调用的代码,调用却不能显示了.
还有TITLELEN这个值为什么不管用?
下面是PAIHANG.ASP文件代码:
<!--#include file="conn.asp"-->
<!--#include file="include/function.asp"-->
<%
url="http://article.hbdx.com.cn/"
num=request.querystring("num")
if num=empty then
response.write "document.write(""请设置显示数量!"");"
response.end
elseif isnumeric(num)=false then
response.write "document.write(""请正确设置显示数量!"");"
response.end
end if
titlelen=request.querystring("titlelen")
if titlelen=empty then
response.write "document.write(""请设置显示字符数!"");"
response.end
elseif isnumeric(titlelen)=false then
response.write "document.write(""请正确设置显示字符数!"");"
response.end
end if
set rs=conn.execute("select top "&num&" data_id,title,addtime from data order by data_id desc")
if rs.bof or rs.eof then
response.Write "document.write(""没有数据!"");"
response.End
else
do while not rs.eof
if len(rs("title"))>titlelen then
title=left(rs("title"),titlelen) & "..."
else
title=rs("title")
end if
response.write "document.write(""<tr><td><font color=#ff0000>·</font> "");"
response.write "document.write(""<font color=#666666>["&rs("addtime")&"]</font> "");"
response.write "document.write(""<a href="&url&"visit.asp?data_id="&rs("data_id")&" target=_blank >"&title&"</a>"");"
response.write "document.write(""<br></td></tr>"");"
rs.movenext
loop
rs.close:set rs=nothing
end if
%>
请各位帮忙.