Sometimes the Web page in different resolution visual effects are not the same, in order to achieve the best visual effect, the best way is to do a few pages, so that they adapt to the commonly used resolutions, and finally use the code described below to determine the resolution of the browser, to give the best visual effect.
This method is relatively simple, hehe. Everyone can change according to their own requirements.
Make 3 pages, respectively named "640480.htm" "800600.htm" 1024768.htm, 3 pages for the three resolution of the page browsing, and then index.htm the original code is as follows:
<script language= "JavaScript" >
<!--Begin
function Redirectpage () {
var url640x480= "640480.htm";
var url800x600= "800600.htm";
var url1024x768= "1024768.htm";
if ((screen.width==640) && (screen.height==480)
window.lacation.href=url640x480;
else if ((screen.width==800) && (screen.height==600)
window.lacation.href=url800x600;
else if ((screen.width==1024) && (screen.height==768)
window.lacation.href=url1024x768;
else window.lacation.href=url800x600;
}
End--! >
</script>
<body onload= "Redirectpage ();" >
</body>
How, very simple, so do your site user experience has improved a grade!