Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果 JavaScript 被禁用,我如何检查用户是否已加载网页(否则我可以在页面就绪时发送请求)?
您可以在将发出请求的页脚中放置一个代码,例如:
<img src="http://<example.url>/?user_ip=<?php echo $_SERVER['REMOTE_ADDR']&<any other data needed>" style="display:none" />
当用户加载页面时,他将 ping example.url,您可以存储和进一步处理此请求。