NEWSFEED » |
ScriptsGeneratorsScript Bits |
Browser Window Dimensions
Example Script// Simple Browser Check var moz = (document.getElementById && !document.all) ? 1 : 0; // Browser Window Dimensions function winWid(){ return (moz) ? window.innerWidth : document.body.clientWidth; } function winHei(){ return (moz) ? window.innerHeight : document.body.clientHeight; } // Example Use var displaywitdh = winWid(); var displayheight = winHei(); document.write('Width = '+displaywitdh+' : Height = '+displayheight); |
|||