复制代码 代码如下:
<script type="text/javascript">
/*详细方法1*/
function CheckBrowser()
{
var app=navigator.appName;
var verStr=navigator.appVersion;
//火狐浏览器
if (app.indexOf('Netscape') != -1)
{
alert("你使用的是Netscape浏览器或火狐浏览器。");
}
else if (app.indexOf('Microsoft') != -1)
{
if (verStr.indexOf("MSIE 3.0")!=-1 || verStr.indexOf("MSIE 4.0") != -1 || verStr.indexOf("MSIE 5.0") != -1 || verStr.indexOf("MSIE 5.1") != -1)
{
alert("您使用的是低版本(IE6.0以下)的浏览器.");
}
else
{
alert("您使用的是IE6.0以上的浏览器.");
}
}
}
/*简洁方法2*/
function CheckBrowser1()
{
if (window.navigator.userAgent.indexOf("MSIE")>=1)
//如果浏览器为IE
{
alert("IE浏览器");
}
else //如果浏览器为Firefox
{
if (window.navigator.userAgent.indexOf("Firefox")>=1)
{
alert("Fixfox浏览器");
}
}
}
//调用
CheckBrowser();
CheckBrowser1();
</script>
JavaScript 获取 客户端信息
复制代码 代码如下:
document.write("Screen resolution: ")
document.write(screen.width + "*" + screen.height)
document.write("<br />")
document.write("Available view area: ")
document.write(screen.availWidth + "*" + screen.availHeight)
document.write("<br />")
document.write("Color depth: ")
document.write(screen.colorDepth)
document.write("<br />")
document.write("Buffer depth: ")
document.write(screen.bufferDepth)
document.write("<br />")
document.write("DeviceXDPI: ")
document.write(screen.deviceXDPI)
document.write("<br />")
document.write("DeviceYDPI: ")
document.write(screen.deviceYDPI)
document.write("<br />")
document.write("LogicalXDPI: ")
document.write(screen.logicalXDPI)
document.write("<br />")
document.write("LogicalYDPI: ")
document.write(screen.logicalYDPI)
document.write("<br />")
document.write("FontSmoothingEnabled: ")
document.write(screen.fontSmoothingEnabled)
document.write("<br />")
document.write("PixelDepth: ")
document.write(screen.pixelDepth)
document.write("<br />")
document.write("UpdateInterval: ")
document.write(screen.updateInterval)
document.write("<br />")
<script type="text/javascript">
/*详细方法1*/
function CheckBrowser()
{
var app=navigator.appName;
var verStr=navigator.appVersion;
//火狐浏览器
if (app.indexOf('Netscape') != -1)
{
alert("你使用的是Netscape浏览器或火狐浏览器。");
}
else if (app.indexOf('Microsoft') != -1)
{
if (verStr.indexOf("MSIE 3.0")!=-1 || verStr.indexOf("MSIE 4.0") != -1 || verStr.indexOf("MSIE 5.0") != -1 || verStr.indexOf("MSIE 5.1") != -1)
{
alert("您使用的是低版本(IE6.0以下)的浏览器.");
}
else
{
alert("您使用的是IE6.0以上的浏览器.");
}
}
}
/*简洁方法2*/
function CheckBrowser1()
{
if (window.navigator.userAgent.indexOf("MSIE")>=1)
//如果浏览器为IE
{
alert("IE浏览器");
}
else //如果浏览器为Firefox
{
if (window.navigator.userAgent.indexOf("Firefox")>=1)
{
alert("Fixfox浏览器");
}
}
}
//调用
CheckBrowser();
CheckBrowser1();
</script>
JavaScript 获取 客户端信息
复制代码 代码如下:
document.write("Screen resolution: ")
document.write(screen.width + "*" + screen.height)
document.write("<br />")
document.write("Available view area: ")
document.write(screen.availWidth + "*" + screen.availHeight)
document.write("<br />")
document.write("Color depth: ")
document.write(screen.colorDepth)
document.write("<br />")
document.write("Buffer depth: ")
document.write(screen.bufferDepth)
document.write("<br />")
document.write("DeviceXDPI: ")
document.write(screen.deviceXDPI)
document.write("<br />")
document.write("DeviceYDPI: ")
document.write(screen.deviceYDPI)
document.write("<br />")
document.write("LogicalXDPI: ")
document.write(screen.logicalXDPI)
document.write("<br />")
document.write("LogicalYDPI: ")
document.write(screen.logicalYDPI)
document.write("<br />")
document.write("FontSmoothingEnabled: ")
document.write(screen.fontSmoothingEnabled)
document.write("<br />")
document.write("PixelDepth: ")
document.write(screen.pixelDepth)
document.write("<br />")
document.write("UpdateInterval: ")
document.write(screen.updateInterval)
document.write("<br />")
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“Javascript 判断客户端浏览器类型代码”评论...
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?