JavaScript Tutorial/Screen/Resolution
Версия от 18:52, 25 мая 2010; (обсуждение)
Check screen resolution
<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>