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.
StackOverflow 分析帖子显示了一个关于用户屏幕分辨率的有趣指标。这是如何收集的?这是你可以用 JavaScript 做的事情吗?
这是一个例子:
http://www.pageresource.com/jscript/jscreen.htm
是的,可以使用 Javascript 获取此信息。可以使用以下变量访问值:
屏幕宽度:screen.width
屏幕高度:screen.height