»
EnglishFrenchVietnamese

Print - Detecting screen/browser resolution - JavaScriptBank.com

Full version: jsB@nk » Browser » Detecting screen/browser resolution
URL: https://www.javascriptbank.com/detecting-screen-browser-resolution.html

Detecting screen/browser resolution © JavaScriptBank.comThis JavaScript is most simple way to detect screen resolution of your visitors, then redirecting them to the appropriate URL; if you want more in this code, such as: set resolution, change resolution, ... it can not. This JavaScript just have a few code lines, just for browser detect by detecting the screen width.

Full version: jsB@nk » Browser » Detecting screen/browser resolution
URL: https://www.javascriptbank.com/detecting-screen-browser-resolution.html



JavaScript
<script type="text/javascript"><!--/* Script by RoBorgRoBorg@geniusbug.comhttp://javascript.geniusbug.com | http://www.roborg.co.ukPlease do not remove or edit this messagePlease link to this Web site if you use this script! */switch(screen.width) { case 640: goToPage('640x480.htm'); break; case 720: goToPage('720x480.htm'); break; case 800: goToPage('800x600.htm'); break; case 848: goToPage('848x480.htm'); break; case 1024: goToPage('1024x768.htm'); break; case 1152: goToPage('1152x864.htm'); break; case 1280: goToPage('1280x1024.htm'); break; case 1600: goToPage('1600x1200.htm'); break; default : goToPage('800x600.htm'); break;}function goToPage(url) { alert('You would have been forwarded to ' + url);}//--></script>