<script>
const fpPromise = new Promise((resolve, reject) => {
const script = document.createElement('script')
script.onload = resolve
script.onerror = reject
script.async = true
script.src = 'https://cdn.jsdelivr.net/npm/'
+ '@fingerprintjs/fingerprintjs@3/dist/fp.min.js'
document.head.appendChild(script)
})
.then(() => FingerprintJS.load())
// Get the visitor identifier when you need it.
fpPromise.then(fp => fp.get()).then(result => {
// This is the visitor identifier:
const visitorId = result.visitorId
console.log('唯一标识:' + visitorId)
})
</script>
js获取当前设备的唯一标识
猜你喜欢
转载自blog.csdn.net/qq_22823581/article/details/135225366
今日推荐
周排行