Navigator 对象包含有关浏览器的信息,通常用于检测浏览器与操作系统的版本。
对象属性:
实例代码:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
</head>
<script type="text/javascript">
document.write(navigator.appName+"<br/>")
document.write(navigator.appCodeName+"<br/>")
document.write(navigator.appVersion+"<br/>")
document.write(navigator.platform+"<br/>")
document.write(navigator.userAgent)
</script>
<body>
</body>
</html>