包含有关浏览器的信息
一个只读字符串,声明了浏览器的代码名
googleIEfirefoxsafarioperatruetruetruetruetrue`navigator.appCodeName`
document.write("浏览器代号: " + navigator.appCodeName);可返回浏览器的名称
googleIEfirefoxsafarioperatruetruetruetruetrue`navigator.appName`
document.write("浏览器名称: " + navigator.appName);可返回浏览器的平台和版本信息。该属性是一个只读的字符串
googleIEfirefoxsafarioperatruetruetruetruetrue`navigator.appVersion`
document.write("浏览器版本信息: " + navigator.appVersion);返回一个布尔值,如果浏览器启用了 cookie,该属性值为 true。如果禁用了 cookie,则值为 false
googleIEfirefoxsafarioperatruetruetruetruetrue`navigator.cookieEnabled`
document.write("是否启用 Cookie: " + navigator.cookieEnabled);只读的字符串,声明了运行浏览器的操作系统和(或)硬件平台
googleIEfirefoxsafarioperatruetruetruetruetrue`navigator.platform`
document.write("硬件平台: " + navigator.platform);只读的字符串,声明了浏览器用于 HTTP 请求的用户代理头的值
googleIEfirefoxsafarioperatruetruetruetruetrue`navigator.userAgent`
document.write("用户代理: " + navigator.userAgent);一个只读的布尔值,声明了系统是否处于脱机模式
navigator.onLine
document.write(navigator.onLine)返回一个布尔值,该值指示浏览器是否支持并启用了 Java。如果是,则返回 true,否则返回 false。
googleIEfirefoxsafarioperatruetruetruetruetruenavigator.javaEnabled()
document.write("启用Java: " + navigator.javaEnabled());文档内容出自 W3cSchool和菜鸟教程, 如需查看更详细的有关内容 请登录 http://www.w3school.com.cn/ 和 http://www.runoob.com/