📜  如何在javascript代码示例中获取访问者IP地址

📅  最后修改于: 2022-03-11 15:04:04.039000             🧑  作者: Mango

代码示例1
fetch('https://api.ipify.org/?format=json').then(results => results.json()).then(data => console.log(data.ip))