Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1446 How can I get the ip address of the client using JavaScript?

You are here: irt.org | FAQ | JavaScript | General | Q1446 [ previous next ]

Only in Netscape unless you write a Java Applet:

<script language="JavaScript"><!--
if (navigator.appName=='Netscape' && navigator.javaEnabled()) {
   hn = java.net.InetAddress.getLocalHost().getHostName();
   ha = java.net.InetAddress.getLocalHost().getHostAddress();
   document.write('HostName: '+ hn + '<br>' + 'HostAddress: '+ ha );
}
//--></script>

Feedback on 'Q1446 How can I get the ip address of the client using JavaScript?'

©2018 Martin Webb