Tsys News list js Call Download _ Application Tips

Source: Internet
Author: User
A lot of netizens asked how to do a JS news call program, now posted for your reference:

JS Caller Program:
List2.asp

Source:--------------------------------------------------------------------------------
<!--#include file= "conn.asp"-->
<%
Dim Rs,sql
Dim specid ' resource attribute ID
SPECID=CLNG (Request ("Specid"))

Sql= "SELECT Top 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
%>
--------------------------------------------------------------------------------

Call Method:

Source:------------------------------------------------------------------------
<script src= "List2.asp?specid=13" ></script>

--------------------------------------------------------------------------------

Explain ......... The top is TSYS1.0 ....

Here is my TSYS1.1-enhanced version of.
<!--#include file= "include/config.asp"-->
<%
Dim Rs,sql
Dim specid ' resource attribute ID
SPECID=CLNG (Request ("Specid"))

Dim Conn
Set Conn = Server.CreateObject ("Adodb.connection")
Conn.Open ConnStr
Sql= "SELECT Top 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
%>

Everyone see include/config.asp should know where to keep it ...

You can look at the demo:
Http://31u.net/html/zhuanti/daima005.htm
Call is the Www.31u.net home page recommendation information ... Feature is 35.

Of course can be based on this to write the list of JS News column ... from 31u.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.