JS获取操作系统及浏览器信息
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
var sUserAgent;
var sPlatform;
function getOS()
{
sUserAgent = navigator.userAgent;
sPlatform = navigator.platform;
return sUserAgent+"<br>****<br>"+sPlatform;
}
document.writeln(getOS());
</script>
</head>
<body onload="getOS()" >
</body>
</html>