WEB开发网:  对于客户端分辨率的问题可以通过asp在服务器端进行判断,其它用Javascript脚本也可以完成这个功能。下面就给出代码:<script language=javascript>if
赞助商链接
中资源
>> 最新文章
>> 赞助商
>> 热门文章
WEB开发网文章阅读

根据客户端的分辨率重定向不同网页

作者:未知 文章来源:WEB开发者 更新时间:2007-12-9 18:05:53

  对于客户端分辨率的问题可以通过asp在服务器端进行判断,其它用Javascript脚本也可以完成这个功能。下面就给出代码:

<script language=javascript>
if (window.screen){
  var widths = screen.width;
  url_640 = default800.htm;
  url_800 = default800.htm;
  url_1024 = default1024.htm;
  if(widths<740){
    self.location.replace(url_640);
  }
  if(widths>=740 & w<835){
    self.location.replace(url_800);
  }
  if(widths>=835){
    self.location.replace(url_1024);
  }
}
</script>

技术交流 永无止境


百度搜索中共有相关主题
[阅读:次] [返回上一页] [打 印]
  • 相关文章
  • 本类热门