如何打印 * Console.Log * IP地址
我有一个JS代码,该代码使用IPIFY使用公共API访问我/或客户端的IP地址。 我本质上想知道我是否可以以某种方式将json.ip(IP地址)打印到控制台)? 这似乎很明显,但我无法使它起作用。
<script type="application/javascript">
function getIP(json) {
dataLayer.push({"event":"ipEvent","ipAddress" : json.ip});
}
</script>
<script type="ap.....
I have a piece of JS code which uses a public API by ipify to access my/or clients' IP address.
I was essentially wondering if I could somehow print the json.ip (IP address) to the console)?
It seems fairly obvious but I can't make it work.
<script type="application/javascript">
function getIP(json) {
dataLayer.push({"event":"ipEvent","ipAddress" : json.ip});
}
</script>
<script type="ap.....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)