2014-04-22 3 views
1

우리는 4 개의 스크린을 사용할 웹 어플리케이션을 개발 중입니다. 화면 수를 세는 방법이 있습니까?Javascript : 화면 수를 카운트하십시오.

+0

이 구글 크롬에서 작동하지 않습니다 http://stackoverflow.com/questions/140462/testing-for-multiple-screens-with-javascript –

답변

1

이 화면 직사각형 구성을 가정

도울 수 있고, 모든 화면은 동일한 높이와 폭을 갖는다.

/// total window width divided by single screen width 

var h_screens = Math.round(window.outerWidth/window.screen.availWidth); 

/// total window height divided by single screen height 
var v_creens = Math.round(window.outerHeight/window.screen.availHeight); 
var total_screens = h_screens * v_creens; 
  • ▆ ▆ ▆ ▆

    4 = 2 * 2; 가능한

+0

중복. https://code.google.com/p/chromium/issues/detail?id=234132 – benjtupas

관련 문제