Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

yzway/Get-Device-Info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

20 Commits

Repository files navigation

License MIT License

JS获取设备信息

  • deviceType: 设备类型
  • OS: 操作系统
  • OSVersion: 操作系统版本
  • screenHeight: 屏幕高
  • screenWidth: 屏幕宽
  • language: 当前使用的语言-国家
  • netWork: 联网类型
  • orientation: 横竖屏
  • browserInfo: 浏览器信息
  • fingerprint: 浏览器指纹
  • userAgent: 包含 appCodeName,appName,appVersion,language,platform 等
  • groPosition: 地理位置
  • date: 系统时间
  • UUID: 通用唯一标识 Universally Unique Identifier

调用方式:

 document.write(JSON.stringify(DeviceInfo.getDeviceInfo(
 {
 domain: 'http://www.skillnull.com',
 info: ['deviceType', 'OS', 'language']
 }
 )))

注:domain是生成浏览器指纹所需的,不传默认使用window.location.host; info为想要获取的信息,不传默认显示全部信息。

About

JS获取设备信息(操作系统信息、地理位置、横竖屏状态、设备类型、网络状态、浏览器信息、生成浏览器指纹等)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

  • JavaScript 84.9%
  • HTML 8.2%
  • CSS 6.9%

AltStyle によって変換されたページ (->オリジナル) /