Web Analytics Made Easy -
StatCounter find window dimensions - CodingForum

Announcement

Collapse
No announcement yet.

find window dimensions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • find window dimensions

    Hi i want to know how i can find the dimensions of a window. I want to know his curent width and height

  • #2
    Code:
    function winSize(){	
    	var A=[0,0];
    	if(window.innerWidth){
    		A= [window.innerWidth, window.innerHeight];
    	}	
    	else {
    		var D=document.documentElement;
     		if(D && D.clientHeight) A= [D.clientWidth, D.clientHeight];	
    	}	
    	return  A;
    }

    Comment

    Working...
    X