比如页面会跟根据显示器是15寸,17寸,宽屏,正屏自动调整。
高分请较web达人?
谢谢!!!

解决方案 »

  1.   

    1 width 使用 100%而不是指定固定的宽度
    2 使用 js 读取屏幕的宽度和高度,然后调整显示的页面参数。
      

  2.   

    按照百分比可以用js判断的话:function openUrl(url){
    if(screen.width <= 800){
             window.open(url,"",
                "titlebar=yes,fullscreen=no,dependent=yes,height=600,width=800,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,channelmode=no,status=no,location=no,directories=no");
     }
     else{
             var top_position = (screen.width - 800) / 2;
     var left_position = (screen.height - 600) / 2;
             window.open(url,"",
                 "titlebar=yes,fullscreen=no,dependent=yes,height=600,width=800,top="+top_position+",left="+left_position+",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,channelmode=no,status=no,location=no,directories=no");
         }
    return ;
    }
      

  3.   

    用screen.width,screen.height 获取长宽
      

  4.   

    CSS 就可以,宽度设置成百分比值,例如 table {width: 100%;}
      

  5.   

    用js获取屏幕宽度和高度:
    window.screen.availWidth 返回当前屏幕宽度(空白空间) 
    window.screen.availHeight 返回当前屏幕高度(空白空间) 
    window.screen.width 返回当前屏幕宽度(分辨率值) 
    window.screen.height 返回当前屏幕高度(分辨率值) 
      

  6.   

    function openUrl(url){      var h= screen.width;
          var w= screen.height-30;//去掉任务栏的高度(忘记用不用去掉IE工具栏高度了,此高度自行设定)
          window.open(url,"",
                     "titlebar=yes,fullscreen=no,dependent=yes,height=h,width=w,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,channelmode=no,status=no,location=no,directories=no");
          return ;
    }
    更正一下4楼的回复,他限定到800×600的窗口大小了,楼主的想法是根据当前分辨率来设置大小
      

  7.   

    JavaScript么?
    用screen.width和screen.height
    eg:
      if((screen.width==1024)&&(screen.height==768))
        
       在html中width="100%"和height="100%"这样用百分号就可以了阿