Loading

获取手机尺寸

获取手机尺寸

js

<script>
  var stra = '你的浏览器:' + "<br>";
  stra += "代号: " + navigator.appCodeName + "<br>";
  stra += "名称: " + navigator.appName + "<br>";
  stra += "版本: " + navigator.appVersion + "<br>";
  stra += "启用Cookies: " + navigator.cookieEnabled + "<br>";
  stra += "硬件平台: " + navigator.platform + "<br>";
  stra += "用户代理: " + navigator.userAgent + "<br>";
  stra += "用户代理语言: " + navigator.language + "<br><br>";
  document.write(stra);

  var strb = '你的屏幕:' + "<br>";
  strb += "总宽度/高度: " + screen.width + "*" + screen.height + "<br>";
  strb += "可视宽度/高度: " + screen.availWidth + "*" + screen.availHeight + "<br>";
  strb += "颜色深度: " + screen.colorDepth + "<br>";
  strb += "颜色分辨率: " + screen.pixelDepth + "<br><br>";
  document.write(strb);
</script>
posted @ 2021-05-12 14:39  hurenweb  阅读(110)  评论(0编辑  收藏  举报