Many netizens asked how to make a JS news call program, and now they are posted for your reference:
JS call program:
List2.asp
Source code:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<!--#includefile="Conn.asp"-->
<%
DimRS, Sql
DimSpecId' Resource Feature Id
SpecId=CLng(Request("SpecId"))
Sql="selectTop10Id,Title,FilePathFromview_NewsInfowhereInstr(','+Specity+',',',"&SpecId&",')<>0OrderByIdDESC"
SetRs=Conn.ExeCute(Sql)
WhileNotRs.Eof
Response.Write"document.write(""<ahref='/Tsys/NewsFiles/"&Rs("FilePath")&"'target='_blank'>"&Rs("Title")&"</a><br/>"")"&vbCrLf
Rs.MoveNext
Wend
Rs.Close
SetRs=Nothing
%>
--------------------------------------------------------------------------------
Calling method:
Source code:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<scriptsrc="list2.asp?specId=13"></script>
--------------------------------------------------------------------------------
Let me explain it.....The above is TSYS1.0...
Below is the enhanced version of TSYS1.1 written by me..
<!--#includefile="Include/Config.asp"-->
<%
DimRS, Sql
DimSpecId' Resource Feature Id
SpecId=CLng(Request("SpecId"))
DimConn
SetConn=Server.createObject("Adodb.Connection")
Conn.OpenConnStr
Sql="selectTop10Id,Title,FilePathFromview_NewsInfowhereInstr(','+Specity+',',',"&SpecId&",')<>0OrderByIdDESC"
SetRs=Conn.ExeCute(Sql)
WhileNotRs.Eof
Response.Write"document.write(""<ahref='"&Rs("FilePath")&"'target='_blank'>"&Rs("Title")&"</a><br/>"")"&vbCrLf
Rs.MoveNext
Wend
Rs.Close
SetRs=Nothing
conn.close
setconn=nothing
%>
Everyone should know where to save it when you look at Include/Config.asp...
You can see the demo:
http://31u.net/html/zhuanti/daima005.htm
The call is the recommended information on the home page of www.31u.net... The feature is 35..
Of course, you can write a JS news list for sub-columns based on this...from31u.com