if(window.screen.width==1024){window.location.href="index.htm"}
esle
{window.location.href="index_.htm"}

解决方案 »

  1.   

    把这段代码加入你的网页中
    <script>
    window.onload = function () {
        if(screen.width == 1024)
            location.href='index.html';
        if(screen.width == 800)
            location.href='index2.htm';
    }
    </script>
      

  2.   

    <script language="JavaScript">
    if (window.screen.width == "800") {
    location.href = "800.htm";
    }
    if (window.screen.width == "1024") {
    location.href = "1024.htm";
    }
    alert(window.screen.height);
    </script>