ชาวเน็ตหลายคนถามว่าจะทำโปรแกรมโทร JS News ได้อย่างไรและตอนนี้พวกเขาถูกโพสต์สำหรับการอ้างอิงของคุณ:
โปรแกรมการโทร JS:
list2.asp
ซอร์สโค้ด: ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<!-#includefile = "conn.asp"->
-
dimrs, sql
รหัสคุณลักษณะทรัพยากรของ dimspecid '
specid = clng (คำขอ ("specid"))
sql = "selecttop10id, title, filepathfromview_newsinfowhereinstr (','+specity+',', '," & specid & ",') <> 0OorderByIdDesc"
setRs = conn.execute (SQL)
whilenotrs.eof
response.write "document.write (" "<ahref = '/tsys/newsfiles/" & rs ("filepath") & "' target = '_ blank'>" & rs ("title") & "</a> <br/>" ")" & vbcrlf
Rs.Movenext
ใช้
Rs.close
setrs = ไม่มีอะไร
-
-
วิธีการโทร:
ซอร์สโค้ด: ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<scriptsrc = "list2.asp? specid = 13"> </script>
-
ให้ฉันอธิบาย ..... ด้านบนคือ tsys1.0 ...
ด้านล่างนี้เป็นเวอร์ชันที่ได้รับการปรับปรุงของ TSYS1.1 เขียนโดยฉัน ..
<!-#includefile = "include/config.asp"->
-
dimrs, sql
รหัสคุณลักษณะทรัพยากรของ dimspecid '
specid = clng (คำขอ ("specid"))
dimconn
setConn = server.createObject ("adodb.connection"))
conn.openconnstr
sql = "selecttop10id, title, filepathfromview_newsinfowhereinstr (','+specity+',', '," & specid & ",') <> 0OorderByIdDesc"
setRs = conn.execute (SQL)
whilenotrs.eof
response.write "document.write (" "<ahref = '" & rs ("filepath") & "' target = '_ blank'>" & rs ("title") & "</a> <br/>" ")" & vbcrlf
Rs.Movenext
ใช้
Rs.close
setrs = ไม่มีอะไร
conn.close
setConn = ไม่มีอะไร
-
ทุกคนควรรู้ว่าจะบันทึกที่ไหนเมื่อคุณดู/config.asp ...
คุณสามารถดูการสาธิต:
http://31u.net/html/zhuanti/daima005.htm
การโทรคือข้อมูลที่แนะนำในหน้าแรกของ www.31u.net ... คุณสมบัติคือ 35 ..
แน่นอนคุณสามารถเขียนรายการข่าว JS สำหรับคอลัมน์ย่อยตามนี้ ... จาก 31U.com