javaScript怎么做到统计访问量?
网上搜了一下发现静态网站统计貌似有点麻烦。
http://my.oschina.net/ailingling/blog...
就去谷歌了下。
第一个网站
http://www.webestools.com/visitors-co...
Welcome on the visitors counter,
A visitors counter is a counter which simply count the number of visitors of a web site. A visitor is counted only 1 time per day.
Our visitors counter is free and you don't need to register on Webestools to be able to use it. We offer you various counter styles, you also have the possibility to choose the start number and the minimum number of digits the counter should display. Then, you canpreview the result by clicking on the "Preview" button. If your counter looks good, you only have to click on the "Create" button to get the (X)html code that you have to copy on your website to show the visitors counter.
这个就一个JS
<div style="text-align:center;"><script type="text/javascript" src="http://services.webestools.com/cpt_visitors/27120-13-6.js"></script></div></a>
插入HTML就可以统计了。。这是什么原理?
这个引用的JS里面
[javascript]document.write("<a href=\"http://www.webestools.com/visitors-counter-free-number-unique-visitors-users-visits-statistics.html\"><img src=\"http://services.webestools.com/images/s13_0.gif\" class=\"cpt_viu_27120\" alt=\"0\" style=\"border:0px;\" /><img src=\"http://services.webestools.com/images/s13_0.gif\" class=\"cpt_viu_27120\" alt=\"0\" style=\"border:0px;\" /><img src=\"http://services.webestools.com/images/s13_0.gif\" class=\"cpt_viu_27120\" alt=\"0\" style=\"border:0px;\" /><img src=\"http://services.webestools.com/images/s13_0.gif\" class=\"cpt_viu_27120\" alt=\"0\" style=\"border:0px;\" /><img src=\"http://services.webestools.com/images/s13_0.gif\" class=\"cpt_viu_27120\" alt=\"0\" style=\"border:0px;\" /><img src=\"http://services.webestools.com/images/s13_2.gif\" class=\"cpt_viu_27120\" alt=\"2\" style=\"border:0px;\" /></a>");[/javascript]
请问下它是怎么做到的?