Answers for "get page size javascript"

10

get window size javascript

const window {
  width: window.innerWidth,
  height: window.innerHeight
}
Posted by: Guest on June-03-2020
0

javascript function page size

//function for screen resize
 function screen_resize() {
        var h = parseInt(window.innerHeight);
        var w = parseInt(window.innerWidth);

        if(w <= 500) {
            //max-width 500px
            // actions here...
            red();
        } else if(w > 500 && w <=850) {
            //max-width 850px
            // actions here...
            orange();
        } else {
            // 850px and beyond
            // actions here...
            green();
        }

    }
Posted by: Guest on March-20-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language