请教怎样采集到javascript里面调用的内容
本帖最后由 buxuku 于 2011-4-4 22:08 编辑比如有这样一段代码<b>软件下载统计:</b><script language="JavaScript" src="/soft/hits.asp?id=37451&type=0"></script>
其中后面统计的数字是通过javascript来调用的,如果直接打开那个页面又是什么都不显示,请问怎么通过火车头来采集到里面的内容呢?
目标页面的源代码是:<!--#include file="config.asp" -->
<%
Response.ContentType="text/html"
Response.Expires = -9999
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-ctrol", "no-cache"
Dim softid,Rs,SQL
Dim AllHits,DayHits,WeekHits,MonthHits,HitsTime,hits,stype,s
NewAsp.ChkPostAgent()
softid=NewAsp.ChkNumeric(Request.Querystring("id"))
If softid=0 Then softid=NewAsp.ChkNumeric(Request.Querystring("softid"))
stype = NewAsp.ChkNumeric(Request.Querystring("type"))
s = NewAsp.ChkNumeric(Request.Querystring("s"))
If Not IsObject(Conn) Then ConnectionDatabase
Set Rs = NewAsp.CreateAXObject("ADODB.Recordset")
SQL = "SELECT AllHits,DayHits,WeekHits,MonthHits,HitsTime FROM NC_SoftList WHERE softid="& softid
Rs.Open SQL,Conn,1,3
If Not(Rs.BOF And Rs.EOF) Then
If s=1 Then
hits = CLng(Rs("AllHits"))+1
Rs("AllHits").Value = hits
If DateDiff("Ww", Rs("HitsTime"), Now) <= 0 Then
Rs("WeekHits").Value = Rs("WeekHits").Value + 1
Else
Rs("WeekHits").Value = 1
End If
If DateDiff("M", Rs("HitsTime"), Now) <= 0 Then
Rs("MonthHits").Value = Rs("MonthHits").Value + 1
Else
Rs("MonthHits").Value = 1
End If
If DateDiff("D", Rs("HitsTime"), Now) <= 0 Then
Rs("DayHits").Value = Rs("DayHits").Value + 1
Else
Rs("DayHits").Value = 1
Rs("HitsTime").Value = Now
End If
Rs.Update
End If
AllHits = Rs("AllHits")
DayHits = Rs("DayHits")
WeekHits = Rs("WeekHits")
MonthHits = Rs("MonthHits")
End If
Rs.close
Set Rs=nothing
NewAsp.PageEnd()
If stype = 1 Then
Response.Write "var oHits=document.getElementById(""NewAsp_Hits"");" & vbNewLine
Response.Write "if (oHits!=null) {" & vbNewLine
Response.Write "oHits.style.display='';" & vbNewLine
Response.Write "oHits.innerHTML="& Chr(34) &"本日:"& DayHits &" 本周:"& WeekHits &" 本月:"& MonthHits &" 总数:"& AllHits &" "& Chr(34) &";" & vbNewLine
Response.Write "}" & vbNewLine
ElseIf stype = 2 Then
Response.Write "本日:"& DayHits &" 本周:"& WeekHits &" 本月:"& MonthHits &" 总数:"& AllHits
ElseIf stype = 3 Then
Response.Write ""
ElseIf stype = 4 Then
Response.Write "document.write (' ');"
Else
Response.Write "document.write ("& Chr(34) &"本日:"& DayHits &" 本周:"& WeekHits &" 本月:"& MonthHits &" 总数:"& AllHits &" "& Chr(34) &");"
End If
%> 多页采集就可以了{:4_180:}
页:
[1]