2015年3月12日 星期四

第二週 2015/03/13

JavaScript 

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

<script language="JavaScript">
<!--
document.write("Hello, 賀信華.This sentence is written using JavaScript.");
// 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>
=======================================================================
參考資料:http://taiwantc.com/js/js_tut_a1.htm


=======================================================================
..............................................................................................................................................
=======================================================================
JAVA

=======================================================================
/**
 * The HelloWorldApp class implements an application that
 * simply prints "Hello World!" to standard output.
 */
class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); // Display the string.
    }
}

=======================================================================
..............................................................................................................................................
=======================================================================

運用命令提示字元顯示IP


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");
    }
  }
}
=======================================================================
..............................................................................................................................................
=======================================================================


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

<script language="JavaScript">
<!--
document.write("Hello, 吳祐豪.This sentence is written using JavaScript.");
// 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>

=======================================================================

2015年3月5日 星期四

第一週 2015/03/06

=======================================================================

1.為何why要選修這門課?(動機)

      想學習基本的程式語法。

2.希忘從這門課獲得那些知識?(目標)

      JAVA的語法運用。

3.我要如何修習這一門課?(態度與方法)

      跟著老師的上課步調,努力完成每節課的作業,自己設計一些題材來完成,上網找尋資料,自學。

=======================================================================


class Test
{
public static void main(String[] args)
{
System.out.println("_____*_____");
System.out.println("____***____");
System.out.println("___*****___");
System.out.println("__*******__");
System.out.println("_____*_____");
System.out.println("_____*_____");
}
}


=======================================================================