Check screen resolution : Resolution « Screen « JavaScript Tutorial






<html>
<head>
<script language="JavaScript" type = "text/javascript">
<!--
if (screen.width == 640){
  alert("Resolution is 640 by 480");
} else if(screen.width == 800) {
  alert("Resolution is 800 by 600");
} else if (screen.width == 1024){
  alert("Resolution is 1024 by 768");
} else if (screen.width > 1024){
   alert("Resolution is greater than 1024 by 768");
}
//-->
</script>
</head>
<body>
</body>
</html>








18.2.Resolution
18.2.1.Check screen resolution