Javascript hit counter for a website

前端 未结 4 522
执念已碎
执念已碎 2021-01-18 09:14

I\'m trying to code a hit counter for a website. As a preference, not required, I\'m trying to use Javascript to do this. On the website\'s html file, I\'m reading a number

4条回答
  •  旧巷少年郎
    2021-01-18 09:59

    Javascript cannot change a file on a server or client computer without security issues. You may want to also look into loading another page as a blank image using PHP or another server side script language. That can then update the count on the file with no issues.

提交回复
热议问题