让网页适应不同分辨率--广州网站建设,广州网站建设公司,广州网页设计,网站制作,网站建设-WEB新势力
  • 让网页适应不同分辨率
  • 这种方法比较简单地,西西。大家可以根据自己地要求改。 
    做3个页面,分别命名为“640480.htm”“800600.htm“1024768.htm”,3个页面分别为三种分辨率下浏览的页,然后index.htm的原代码如下: 
    <html> 
    <head> 
    <script LANGUAGE="JavaScript"> 
    <!--Begin 
    function redirectPage(){ 
    var url640x480="640480.htm"; 
    var url800x600="800600.htm"; 
    var url1024x768="1024768.htm"; 
    if((screen.width==640)&&(screen.height==480)) 
    window.lacation.href=url640x480; 
    else if((screen.width==800)&&(screen.height==600)) 
    window.lacation.href=url800x600; 
    else if((screen.width==1024)&&(screen.height==768)) 
    window.lacation.href=url1024x768; 
    else window.lacation.href=url800x600; 

    //End--!> 
    </script> 
    </head> 
    <body OnLoad="redirectPage();"> 
    </body> 
    </html> 广州网站建设
  • Write By: [wb117]   Date: [2007-09-20]   Views: [2385]   Comments: 
  •  上一篇:学习网页标准总结文章:关于网页设计知识   下一篇:网页设计应考虑哪些问题?
  •  
  •  √ Write Your Comment
  •  昵称: 
  •  评论: