可以针对不同的分辨率打开不同的页面,代码如下:
<HTML>
<HEAD>
<TITLE>Loading...</TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<script language=javascript>
<!--
function mHref() {
if (screen.width == 1024) location.href = "1024_768.html";
else if (screen.width == 800) location.href = "800_600.html";
else return(false);
}
//-->
</script>
</HEAD>
<BODY onload="mHref();">
</BODY>
</HTML>
还有一种方法,效果可能要更好一些,你可以比较一下试试看,代码如下:
<html>
<head>
<title>Loading...</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<script>
<!--
if ((screen.width == 800) && (screen.height == 600))
window.location.href="index1.htm"; else if ((screen.width == 1024) && (screen.height == 768))
window.location.href="index2.htm"; else window.location.href="index1.htm";
//-->
</script>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>