访问者浏览器是什么平台?

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <h1>Navigator 对象</h1>
  6.  
  7. <p>platform 属性返回浏览器平台(操作系统):</p>
  8.  
  9. <p id="demo"></p>
  10.  
  11. <script>
  12. document.getElementById("demo").innerHTML =
  13. "navigator.platform 是:" + navigator.platform;
  14. </script>
  15.  
  16. </body>
  17. </html>