close

<html>
<head>
<title> The First Example: Hello, World </title>
</head>
<body>
<h2> This line is HTML </h2>

<script language="JavaScript">
<!--
document.write("Hello, World. あああああああ就是勇者的名字嗎.");
// Text on the right of 2 slashes is comment
/* This is comment
that occur more than 1 line
*/
//-->
</script>
<noscript>
Sorry, but your browser doesn't run JavaScript.
</noscript>

<h2> This line is HTML </h2>
</body>
</html>

將程式碼打入記事本->存成htm檔

用遊覽器打開

結果如下

0123  

程式碼修改自:http://taiwantc.com/js/js_tut_a1.htm

 

 

class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); // Display the string.
    }
}

用命令提示字元開啟
JAVAC 檔名&附檔名
JAVA CLASS

圖:

23156  

 

IP CONFIG

IPconfig  

 

 


import java.net.InetAddress;

import java.net.UnknownHostException;



public class getIP {



public static void main(String[] args) {

try {

InetAddress a = InetAddress.getLocalHost();

System.out.println(InetAddress.getLocalHost().getHostAddress());

} catch (UnknownHostException e) {

e.printStackTrace();

}

}

}

GET IP  \\

JavaScript Visitor IP Address and Host Name

 

http://www.hashemian.com/tools/visitor-IP.htm

 

 

<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>

 

javasr-ip  

 

 

 

arrow
arrow
    全站熱搜

    fwcgex1529 發表在 痞客邦 留言(0) 人氣()