用客户端Javascript脚本来实现:
<SCRIPT language="JavaScript">
<!--
if ((screen.width>=1024) && (screen.height>=768))
{
window.location="highres.html";
}
else
{
window.location="lowres.html";
}
//-->
</SCRIPT>
<SCRIPT language="JavaScript">
<!--
if ((screen.width>=1024) && (screen.height>=768))
{
window.location="highres.html";
}
else
{
window.location="lowres.html";
}
//-->
</SCRIPT>
w = document.body.clientWidth; //网页宽
h = document.body.clientHeight; //网页高
alert("窗口高:" + w + "宽:" + h);
alert("屏幕可用工作区高度:" + window.screen.availHeight);
alert("屏幕可用工作区宽度:" + window.screen.availWidth);
alert("屏幕总高度:" + window.screen.height);
alert("屏幕总宽度:" + window.screen.width);
</SCRIPT>