以下代码,可显示访客的IP地址与主机名。
代码:
<script language="javascript"> //获取IP地址与主机名 //by www.jb200.com VIH_BackColor = "palegreen"; VIH_ForeColor = "navy"; VIH_FontPix = "16"; VIH_DisplayFormat = "You are visiting from:<br>IP Address: %%IP%%<br>Host: %%HOST%%"; VIH_DisplayOnPage = "yes"; </script> <script language="JavaScript" src="http://scripts.hashemian.com/js/visitorIPHOST.js.php"></script>
演示示例: