TSYS 新闻列表JS调用下载
程序员文章站
2023-12-01 16:33:46
有很多网友再问如何做一个js新闻调用程序,现在贴出来供大家参考: js调用程序: list2.asp 源码:--------------------------------...
有很多网友再问如何做一个js新闻调用程序,现在贴出来供大家参考:
js调用程序:
list2.asp
源码:--------------------------------------------------------------------------------
<!--#include file="conn.asp" -->
<%
dim rs,sql
dim specid '资源特性id
specid=clng(request("specid"))
sql="select top 10 id,title,filepath from view_newsinfo where instr(','+speciality+',',',"&specid&",')<>0 order by id desc"
set rs=conn.execute(sql)
while not rs.eof
response.write "document.write(""<a href='/tsys/newsfiles/"&rs("filepath")&"' target='_blank'>"&rs("title")&"</a><br/>"")" & vbcrlf
rs.movenext
wend
rs.close
set rs=nothing
%>
--------------------------------------------------------------------------------
调用方法:
源码:------------------------------------------------------------------------
<script src="list2.asp?specid=13"></script>
--------------------------------------------------------------------------------
说明一下..............上面是tsys1.0的....
下面是我写的tsys1.1加强版的..
<!--#include file="include/config.asp" -->
<%
dim rs,sql
dim specid '资源特性id
specid=clng(request("specid"))
dim conn
set conn = server.createobject("adodb.connection")
conn.open connstr
sql="select top 10 id,title,filepath from view_newsinfo where instr(','+speciality+',',',"&specid&",')<>0 order by id desc"
set rs=conn.execute(sql)
while not rs.eof
response.write "document.write(""<a href='"&rs("filepath")&"' target='_blank'>"&rs("title")&"</a><br/>"")" & vbcrlf
rs.movenext
wend
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
大家看include/config.asp应该知道保存在什么地方了吧...
大家可以看下演示:
http://31u.net/html/zhuanti/daima005.htm
调用的是www.31u.net首页的推荐信息...特性为35..
当然可以根据这个来写出分栏目的js新闻列表... from 31u.com
js调用程序:
list2.asp
源码:--------------------------------------------------------------------------------
<!--#include file="conn.asp" -->
<%
dim rs,sql
dim specid '资源特性id
specid=clng(request("specid"))
sql="select top 10 id,title,filepath from view_newsinfo where instr(','+speciality+',',',"&specid&",')<>0 order by id desc"
set rs=conn.execute(sql)
while not rs.eof
response.write "document.write(""<a href='/tsys/newsfiles/"&rs("filepath")&"' target='_blank'>"&rs("title")&"</a><br/>"")" & vbcrlf
rs.movenext
wend
rs.close
set rs=nothing
%>
--------------------------------------------------------------------------------
调用方法:
源码:------------------------------------------------------------------------
<script src="list2.asp?specid=13"></script>
--------------------------------------------------------------------------------
说明一下..............上面是tsys1.0的....
下面是我写的tsys1.1加强版的..
<!--#include file="include/config.asp" -->
<%
dim rs,sql
dim specid '资源特性id
specid=clng(request("specid"))
dim conn
set conn = server.createobject("adodb.connection")
conn.open connstr
sql="select top 10 id,title,filepath from view_newsinfo where instr(','+speciality+',',',"&specid&",')<>0 order by id desc"
set rs=conn.execute(sql)
while not rs.eof
response.write "document.write(""<a href='"&rs("filepath")&"' target='_blank'>"&rs("title")&"</a><br/>"")" & vbcrlf
rs.movenext
wend
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
大家看include/config.asp应该知道保存在什么地方了吧...
大家可以看下演示:
http://31u.net/html/zhuanti/daima005.htm
调用的是www.31u.net首页的推荐信息...特性为35..
当然可以根据这个来写出分栏目的js新闻列表... from 31u.com
上一篇: 一种理论上最快的Web数据库分页方法
下一篇: 如何从数据库中随机取出10条记录的方法