如何获取UA?

代码:

function whatBrowser() {
  document.Browser.Name.value = navigator.appName;
  document.Browser.Version.value = navigator.appVersion;
  document.Browser.Code.value = navigator.appCodeName;
  document.Browser.Agent.value = navigator.userAgent;
}
原文地址:https://www.cnblogs.com/crazycode2/p/11623706.html