alert(screen.width + "*" + screen.height);

解决方案 »

  1.   

    参见:http://www.v-ec.com/jslib/
    【网页宽高】部分!
      

  2.   

    <html>
    <SCRIPT   LANGUAGE="JavaScript">   
      var h = window.screen.height;   
      var w = window.screen.width;   
      if(w=="1024"){
        yourform.action = "1024.jsp"
      }else{
        yourform.action = "1024.jsp"   
      }
      yourform.submit();
      </SCRIPT>
    </html>
      

  3.   

     是这个<html> 
     <SCRIPT  LANGUAGE="JavaScript">  
      var h = window.screen.height;  
      var w = window.screen.width;  
      if(w=="1024"){ 
        yourform.action = "1024.jsp" 
      }else{ 
        yourform.action = "800.jsp"  
      } 
      yourform.submit(); 
      </SCRIPT> 
    </html>
      

  4.   

    <body></body>
    <script language="javascript">
    alert("最大宽度:"+screen.width);
    alert("最大高度:"+screen.height);//去掉任务栏菜单栏工具栏等之后可用的范围,适用于最大化的窗口
    alert("可用宽度:"+screen.availWidth);
    alert("可用高度:"+screen.availHeight);//窗口内html可用的大小,适用于任何状态的窗口
    alert("可用宽度:"+document.body.offsetWidth);
    alert("可用高度:"+document.body.offsetHeight);
    </script>
      

  5.   


    <html> 
     <SCRIPT  LANGUAGE="JavaScript">  
      var h = window.screen.height;  
      var w = window.screen.width;  
      if(w=="1024"){ 
        yourform.action = "1024.jsp" 
      }else{ 
        yourform.action = "800.jsp"  
      } 
      yourform.submit(); 
      </SCRIPT> 
    </html>
      

  6.   


    <HTML>
    <HEAD>
    <TITLE>TEST</TITLE>
    </HEAD>
    <BODY bgcolor="#FFFFFF">
    <script language="JavaScript" type="text/javascript">
    switch(screen.width)
    {
    case 1024:
    location.href="1.htm";
    break;
    case 1280:
    location.href="2.htm";
    break;
    case 800:
    location.href="3.htm";
    break;
    default:
    location.href="default.html";
    }</script>
      
    </BODY>
    </HTML>
      

  7.   

    <body> </body> 
    <script language="javascript"> 
    alert("最大宽度:"+screen.width); 
    alert("最大高度:"+screen.height); //去掉任务栏菜单栏工具栏等之后可用的范围,适用于最大化的窗口 
    alert("可用宽度:"+screen.availWidth); 
    alert("可用高度:"+screen.availHeight); //窗口内html可用的大小,适用于任何状态的窗口 
    alert("可用宽度:"+document.body.offsetWidth); 
    alert("可用高度:"+document.body.offsetHeight); 
    </script>
      

  8.   

    <script type="text/javascript">
    var w = screen.width;
    var h = screen.height;
    var t;
    if (w==1024 && h==768) {
    t = "http://www.baidu.com";
    } else if (w==1280 && h==1024) {
    t = "http://www.google.cn";
    } else if (w==800 && h==600) {
    t = "http://cn.yahoo.com";
    } else {
    t = "http://www.soso.com/";
    }
    location.href = t;
    </script>
      

  9.   

    用screen.width读取屏幕的宽度screen.height读取屏幕的高度。
    如果你对js不懂,建议你找人帮你搞定啦。