有很多网友再问如何做一个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="/UploadFiles/2021-04-02/list2.asp?specId=13">
--------------------------------------------------------------------------------
说明一下..............上面是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="/UploadFiles/2021-04-02/list2.asp?specId=13">
--------------------------------------------------------------------------------
说明一下..............上面是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
标签:
TSYS,新闻列表JS调用下载
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“TSYS 新闻列表JS调用下载”评论...