how to get ip address in javascript
fetch('https://api.ipify.org/?format=json')
.then(response => response.json())
// Returns
{
"ip": "user_ip"
}
how to get ip address in javascript
fetch('https://api.ipify.org/?format=json')
.then(response => response.json())
// Returns
{
"ip": "user_ip"
}
get ip address javascript
<script type="application/javascript">
function getIP(json) {
document.write("My public IP address is: ", json.ip);
}
</script>
<script type="application/javascript" src="https://api.ipify.org?format=jsonp&callback=getIP"></script>
javascript ip address
$.getJSON('https://ipgeolocation.abstractapi.com/v1/?api_key=<your_api_key>', function(data) {
console.log(JSON.stringify(data, null, 2));
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us