1.複製此程式碼
import java.net.*;
public class TestInet1 {
public static void main(String argv[])
{
try {
InetAddress myip = InetAddress.getLocalHost();
System.out.println(myip.getHostName());
System.out.println(myip.getHostAddress());
} catch (UnknownHostException e) {
System.out.println("Error: unable to resolve localhost");
}
}
}
2.改檔名+副檔名
4.複製此程式碼
<script language="JavaScript">
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>
5.改檔名
6.用網頁開完成圖

7.ipconfig截圖

沒有留言:
張貼留言