hwo获取浏览器窗口大小? [英] hwo to get browser window size?

查看:90
本文介绍了hwo获取浏览器窗口大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想收集有关查看我网站的人的统计数据。


实际上,我已经使用了Awstats,但它并没有做我想要的,所以我
将自己编码。


我想知道浏览器窗口访问者访问我网站的大小

(最好是;失败了,什么他们的显示器分辨率是)。


我想要这个信息,以便我知道要显示什么样的分辨率

我的照片。


有什么想法吗?


提前致谢。

I want to collect stats about people viewing my web site.

Actually, I already use Awstats, but it doesn''t do what I want, so I
will code it myself.

I want to know what size browser window visitors to my site use
(preferably; failing that, what their monitor resolution is).

I want this info so that I can know what sort of resolution to display
my photographs at.

Any ideas?

Thanks in advance.

推荐答案

Baron Samedi写道:
Baron Samedi wrote:
我想收集有关查看我网站的人的统计数据。

实际上,我已经使用了Awstats,但它并没有做我想做的事情所以我将自己编写代码。

我想知道我的网站访问者的浏览器窗口大小是什么尺寸(最好是失败,他们的显示器分辨率是多少)。

我想要这个信息,这样我就可以了现在用什么样的分辨率显示我的照片。

任何想法?
I want to collect stats about people viewing my web site.

Actually, I already use Awstats, but it doesn''t do what I want, so I
will code it myself.

I want to know what size browser window visitors to my site use
(preferably; failing that, what their monitor resolution is).

I want this info so that I can know what sort of resolution to display
my photographs at.

Any ideas?



JavaScript。你不能做这个服务器端。


-

Ian Collins。


JavaScript. You can''t do this server side.

--
Ian Collins.


-----开始PGP签名消息-----

哈希:SHA1


Baron Samedi写道:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Baron Samedi wrote:
我想知道访问我网站的浏览器窗口的大小是什么尺寸(最好是失败了,他们的显示器分辨率是多少)。
I want to know what size browser window visitors to my site use
(preferably; failing that, what their monitor resolution is).




给试试看,你会意识到为什么这是不可能的。


- -

- ---------- ------------------------
$ b $bIvánSánchezOrtega-i-punto-sanchez - arroba-mirame-punto-net


El buen tiempo ayuda en el trabajo。


----- BEGIN PGP SIGNATURE -----

版本:GnuPG v1.4.2.2(GNU / Linux)

iD8DBQFEMh5n3jcQ2mg3Pc8RAk + VAJ4nMhHaxV / RJzzhiZqflvXAPWupswCfTdEp

g9bI5XyjhKopD3h4JNPPDgI =

= Pmhl

----- END PGP SIGNATURE -----



Give elinks a try, and you''ll realize why this is not possible.

- --
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

El buen tiempo ayuda en el trabajo.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEMh5n3jcQ2mg3Pc8RAk+VAJ4nMhHaxV/RJzzhiZqflvXAPWupswCfTdEp
g9bI5XyjhKopD3h4JNPPDgI=
=Pmhl
-----END PGP SIGNATURE-----


你可以做是由JavaScript而不是PHP(或两者一起为

某些原因):


< script language =" JavaScript>

var w = screen.width;

var h = screen.height;


alert(''你正在使用''+ w +' 'x''+ h +''决议......!'');


< / script>


Behzad Nategh

You can do this by JavaScript not PHP (or both of them together for
some reason):

<script language="JavaScript>
var w = screen.width;
var h = screen.height;

alert(''You are using '' + w + ''x'' + h + '' resolution...!'');

</script>

Behzad Nategh


这篇关于hwo获取浏览器窗口大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆