自动判断浏览器分辨率
来源:互联网 发布:上瘾网络剧下载 编辑:程序博客网 时间:2024/05/20 00:36
<SCRIPT LANGUAGE="JavaScript">
<!--
if (window.navigator.userAgent.indexOf("MSIE")>=1)
...{
var IE1024="";
var IE800="";
var IE1152="";
var IEother="";
ScreenWidth(IE1024,IE800,IE1152,IEother)
}
else...{
if (window.navigator.userAgent.indexOf("Firefox")>=1)
...{
var Firefox1024="";
var Firefox800="";
var Firefox1152="";
var Firefoxother="";
ScreenWidth(Firefox1024,Firefox800,Firefox1152,Firefoxother)
}
else...{
var Other1024="";
var Other800="";
var Other1152="";
var Otherother="";
ScreenWidth(Other1024,Other800,Other1152,Otherother)
}
}
function ScreenWidth(CSS1,CSS2,CSS3,CSS4)...{
if ((screen.width == 1024) && (screen.height == 768))...{
setActiveStyleSheet(CSS1);
}else...{
if ((screen.width == 800) && (screen.height == 600))...{
setActiveStyleSheet(CSS2);
}else...{
if ((screen.width == 1152) && (screen.height == 864))...{
setActiveStyleSheet(CSS3);
}else...{
setActiveStyleSheet(CSS4);
}}}
}
function setActiveStyleSheet(title)...{
document.getElementsByTagName("link")[0].href="style/"+title;
}
//-->
</SCRIPT>
<!--
if (window.navigator.userAgent.indexOf("MSIE")>=1)
...{
var IE1024="";
var IE800="";
var IE1152="";
var IEother="";
ScreenWidth(IE1024,IE800,IE1152,IEother)
}
else...{
if (window.navigator.userAgent.indexOf("Firefox")>=1)
...{
var Firefox1024="";
var Firefox800="";
var Firefox1152="";
var Firefoxother="";
ScreenWidth(Firefox1024,Firefox800,Firefox1152,Firefoxother)
}
else...{
var Other1024="";
var Other800="";
var Other1152="";
var Otherother="";
ScreenWidth(Other1024,Other800,Other1152,Otherother)
}
}
function ScreenWidth(CSS1,CSS2,CSS3,CSS4)...{
if ((screen.width == 1024) && (screen.height == 768))...{
setActiveStyleSheet(CSS1);
}else...{
if ((screen.width == 800) && (screen.height == 600))...{
setActiveStyleSheet(CSS2);
}else...{
if ((screen.width == 1152) && (screen.height == 864))...{
setActiveStyleSheet(CSS3);
}else...{
setActiveStyleSheet(CSS4);
}}}
}
function setActiveStyleSheet(title)...{
document.getElementsByTagName("link")[0].href="style/"+title;
}
//-->
</SCRIPT>
- 自动判断浏览器分辨率
- 自动判断浏览器分辨率
- js自动判断浏览器分辨率
- js.自动判断浏览器分辨率
- JS自动判断浏览器分辨率
- 根据浏览器分辨率不同自动调用不同CSS
- 根据浏览器分辨率不同自动调用不同CSS
- 浏览器和分辨率不同自动调用不同CSS的代码
- 浏览器和分辨率不同自动调用不同CSS的代码
- CSS背景图片自适应 根据浏览器分辨率大小自动伸缩
- 背景图片自适应分辨率浏览器大小自动拉伸全屏代码
- 探究客户端浏览器分辨率的自适应问题(如何使网站脚本自动适应客户端分辨率)
- JS判断浏览器语言自动跳转
- 判断浏览器,各浏览器页面高度自适应(平铺),各浏览器自适应去除滚动条,浏览器分辨率自适应
- 用PHP判断客户端浏览器类型自动做出后续判断
- 探究客户端浏览器分辨率的自适应问题(如何使网站脚本自动适应客户端分辨率)(1)
- 探究客户端浏览器分辨率的自适应问题(如何使网站脚本自动适应客户端分辨率)(2)
- 探究客户端浏览器分辨率的自适应问题(如何使网站脚本自动适应客户端分辨率)(3)
- 在X11上运行microwindows
- newxy新坐标DAO类对表结构的注册过程,及表结构变化的影响
- DataGrid 导出到 Excel 的帮助类
- 第9回 验证和确认——缺一不可
- 自动判断浏览器分辨率
- 自动判断浏览器分辨率
- 产品经理的第一堂课(十二):媒体还是服务
- mv
- javascript小技巧
- 看EricRaymond如何评价几大开发语言
- 在一点通上配置VLAN C3500+C2900
- javascript小技巧
- struts防止重复提交
- java split