Javascript Navigator get user agent and platform
<!DOCTYPE html> <head> <title>Recipe</title> <script> window.onload = function() {/* w w w . j av a2 s. c o m*/ let browser = navigator.userAgent; let info = "<p>Browser: " + browser + "</p>"; let platform = navigator.platform; info += "<p>Platform: " + platform + "</p>"; document.getElementById("output").innerHTML = info; } </script> </head> <body> <div id="output"></div> </body> </html>