积极答复者
A.com域名下网页如何在B.com网页下被执行,做简单"统计流量的"

问题
答案
-
是用js+javascript的setTimer不断发送异步请求实时获取消息。
If you think one reply solves your problem, please mark it as An Answer, if you think someone's reply helps you, please mark it as a Proposed Answer
Help by clicking:
Click here to donate your rice to the poor
Click to Donate
Click to feed Dogs & Cats- 已标记为答案 Song TianModerator 2013年3月7日 7:53
全部回复
-
建议:
你在B.com中设法弄一个页面,其ContentType是一个普通的text,专门返回统计多少人登录等数据,然后A.com直接使用jQuery+javascript技术(需要定时器:setTimer,每隔N秒异步发送一次请求,并返回结果)。
关于jQuery异步请求,你可以查阅这个代码:
http://www.cnblogs.com/Xingsoft-555/archive/2011/12/27/2304030.html
If you think one reply solves your problem, please mark it as An Answer, if you think someone's reply helps you, please mark it as a Proposed Answer
Help by clicking:
Click here to donate your rice to the poor
Click to Donate
Click to feed Dogs & Cats -
老师您好,昨晚我考虑了一下,我的思路,您看看
========
A.com建一个专门统计的页面,tongji.aspx和tongji.js
在tongji.js里放一句话,就是iframe tongji.aspx然后把iframe css display:none
然后在B.com里放tongji.js?user=thisuser
这样打开B.com时候就会以iframe的方式加载a.com里的tongji.aspx这样就可以直接收集上传保存,因为是多个网站,异步获取访问的话会有点问题,时效性不是很好,而且B.com也不可以放一个页面,只能加载个js
============
请您继续帮助,谢谢
-
是用js+javascript的setTimer不断发送异步请求实时获取消息。
If you think one reply solves your problem, please mark it as An Answer, if you think someone's reply helps you, please mark it as a Proposed Answer
Help by clicking:
Click here to donate your rice to the poor
Click to Donate
Click to feed Dogs & Cats- 已标记为答案 Song TianModerator 2013年3月7日 7:53