if(window.screen.width==800)
    {
       alert("800")
    }else if (window.screen.width==1024)
    {
       alert("1024")
    }

解决方案 »

  1.   

    if(window.screen.width==800)
      {
           url = "800*600的asp.asp"
       }else if (window.screen.width==1024)
       {
           url = "1027*768的asp.asp"
       }
       location.replace(url)//跳转
      

  2.   

    screen.availWidth﹑screen.availHeight這兩個屬性是獲得屏幕分辨率的if(screen.availWidth>=1024)location.replace("indexcopy.asp");
    else {location.replace("index.asp");}
      

  3.   

    default.htm<body onload="document.form1.clientWidth.value=screen.width;document.form1.submit()">
    <form name="form1" action="Redirect.asp" method="post">
    <input name="clientWidth" type=text style="display:none">
    </form>
    Redirect.asp<%
    dim clientWidth
    clientWidth =request.form("clientWidth")
    if clientWidth="800" then
     Response.Redirect "default800.asp"
    else
     Response.Redirect "default1024.asp"
    end if
    %>
      

  4.   

    根据window if(window.screen.width==800)
        {
           url = "800*600.asp"
        }
    else if (window.screen.width==1024)
        {
           url = "1024*768.asp"
        }