w3schools javascript to display current screen size code example Example: get screen width javascript window.screen.width //or just screen.width