How do I get the size of the browser window using Prototype.js?

后端 未结 4 1827
误落风尘
误落风尘 2020-12-11 02:15

How do I get the size of the browser window using Prototype.js version 1.6.0.3?

4条回答
  •  遥遥无期
    2020-12-11 03:03

    this works on all modern browser and ie6+:

    var w = document.documentElement.clientWidth;
    var h = document.documentElement.clientHeight;
    

    A correct Doctype is required

提交回复
热议问题