Client IP Address debacle! Help please

I need help, please. How can I associate the IP address in this context to dmx.value or at least use the result in an HTML input field. I don’t speak a single word in 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>

Community Page
Last updated: