Answers for "valid ip address javascript"

2

how to get ip address in javascript

fetch('https://api.ipify.org/?format=json')
  .then(response => response.json())
// Returns 
{
 "ip": "user_ip"
}
Posted by: Guest on April-24-2021
0

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>
Posted by: Guest on June-30-2021

Code answers related to "valid ip address javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language