SOURCE

console 命令行工具 X clear

                    
>
console
window.onload = function() {
  const datas = [
    {name: '域名', value: document.domain || ''},
    {name: 'URL地址', value: document.URL || ''},
    {name: '网页标题', value: document.title || ''},
    {name: '来源路径', value: document.referrer || ''},
    {name: '显示屏高度', value: window.screen.height || 0},
    {name: '显示屏宽度', value: window.screen.width || 0},
    {name: '显示屏颜色深度', value: window.screen.colorDepth || 0},
    {name: '所用语言', value: window.navigator.language || ''}
  ]
  let info = '';
  datas.forEach(d => {
    info += `<div>${d.name}: ${d.value}</div>`
  })
  document.querySelector('#info').innerHTML = info;
}
<h1>统计用户信息:</h1>
<div id="info">
  
</div>
div{
  margin-bottom: 4px;
}