<script language="javascript">
function check()
{
if(screen.availwidth==800)
   window.location="a.htm"
else
   window.location="b.htm"
}
setTimeout("check()",3000)
</script>

解决方案 »

  1.   

    <script language="javascript">
    if (window.screen){
      var widths = screen.width;
      url_640 = "default640.htm";
      url_800 = "default800.htm";
      url_1024 = "default1024.htm";
      if(widths<740){
        window.setTimeout("self.location.replace(url_640);",3000)
      }
      if(widths>=740 & w<835){
        window.setTimeout("self.location.replace(url_800);",3000)
      }
      if(widths>=835){
         window.setTimeout("self.location.replace(url_1024);",3000)
      }
    }
    </script>