TSYS News list JS call download

Source: Internet
Author: User

Many netizens asked how to create a JS News calling program, which is now posted for your reference:

JS Caller:
List2.asp

Source code :--------------------------------------------------------------------------------
<! -- # Include file = "Conn. asp" -->
<%
Dim RS, SQL
Dim specid' Resource feature 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
%>
--------------------------------------------------------------------------------

Call method:

Source code :------------------------------------------------------------------------
<Script src = "list2.asp? SpecId = 13 "> </script>

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

Let's take a look at ............ the above is TSYS1.0 ....

Below is the TSYS1.1 enhanced version I wrote ..
<! -- # Include file = "Include/Config. asp" -->
<%
Dim RS, SQL
Dim specid' Resource feature 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
%>

We can see that Include/Config. asp should know where it is stored...

You can see the demo:
Http://31u.net/html/zhuanti/daima005.htm
The recommendation information of www.31u.net homepage is called... the feature is 35 ..

Of course, you can write the JS News list in the column according to this... 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.