其他分享
首页 > 其他分享> > 浏览器指纹 fingerprintjs

浏览器指纹 fingerprintjs

作者:互联网

使用示例:

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <input value="" id="input" style="width: 300px;" />
  <div id="user"></div>
  <script>
    const fpPromise = import('https://openfpcdn.io/fingerprintjs/v3')
      .then(e => e.load())
    fpPromise
      .then(fp => fp.get())
      .then(result => {
        const visitorId = result.visitorId
        console.log(visitorId)
        document.getElementById('input').value = visitorId
        document.getElementById('user').innerHTML = window.navigator.userAgent.toLowerCase()
      })
  </script>
</body>

</html>

 

官方:

https://github.com/fingerprintjs/fingerprintjs

 

 

 

 

 

.

标签:浏览器,指纹,fingerprintjs,result,https,visitorId,fpPromise,document
来源: https://www.cnblogs.com/xiangsj/p/15692053.html