JavaScript中的navigator对象学习笔记

var browser=navigator.appName
var b_version=navigator.appVersion
var version=parseFloat(b_version)
document.write("浏览器名称:"+ browser)
document.write("<br />")
document.write("浏览器版本:"+ version)

document.write("<p>指定浏览器的代码名称:")
document.write(navigator.appCodeName + "</p>")

document.write("<p>平台:")
document.write(navigator.platform + "</p>")

document.write("<p>Cookies 启用:")
document.write(navigator.cookieEnabled + "</p>")

document.write("<p>浏览器的用户代理报头:")
document.write(navigator.userAgent + "</p>")

document.write("<p>客户端浏览器页面可视区域的宽度:")
document.write(document.documentElement.clientWidth + "</p>")

document.write("<p>客户端浏览器页面可视区域的高度:")
document.write(document.documentElement.clientHeight + "</p>")

posted on 2015-07-03 13:01  零度CC  阅读(177)  评论(0)    收藏  举报

导航