程式設計工藝大師
程式代碼:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class Test
{
public static void main(String[] args)
{
JButton jbnButton1, jbnButton2;
JTextField jtfInput;
JPanel jblPanel;
JFrame jtfMainFrame;
jtfMainFrame = new JFrame("Which Button Demo");
jtfMainFrame.setSize(550,150);
jbnButton1 = new JButton("Button 1");
jbnButton2= new JButton("Button 2");
jtfInput = new JTextField(20);
JPanel jplPanel = new JPanel();
jplPanel.add(jtfInput);
jplPanel.add(jbnButton1);
jplPanel.add(jbnButton2);
jtfMainFrame.getContentPane().add(jplPanel, BorderLayout.CENTER);
jtfMainFrame.setVisible(true);
System.out.println("123");
}
}
2015年3月27日 星期五
2015年3月19日 星期四
第三週 - 作業
程式設計工藝大師
Excel - 巨集
程式代碼:
Private Sub CommandButton1_Click()
For i = 1 To 10
Cells(1, i) = i
Next i
End Sub
java
程式代碼:
class Test
{
public static void main(String[] args)
{
System.out.println("1");
System.out.println("2");
System.out.println("3");
System.out.println("4");
System.out.println("5");
System.out.println("6");
System.out.println("7");
System.out.println("8");
System.out.println("9");
System.out.println("10");
}
}
JavaScript
程式代碼:
<html>
<head>
<title> The First Example: Hello, World </title>
</head>
<body>
<h2> This line is HTML </h2>
<script language="JavaScript">
<!--
document.write("1 2 3 4 5 6 7 8 9 10");
// 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>
JavaScript
程式代碼:
<html>
<head>
<title> The First Example: Hello, World </title>
</head>
<body>
<h2> This line is HTML </h2>
<script language="JavaScript">
<!--
document.write("1*1=1 1*2=2 1*3=3 1*4=4 1*5=5 1*6=6 1*7=7 1*8=8 1*9=9<br>");
document.write("<br>");
document.write("2*1=1 2*2=2 2*3=3 2*4=4 2*5=5 2*6=6 2*7=7 2*8=8 2*9=9<br>");
document.write("<br>");
document.write("3*1=1 3*2=2 3*3=3 3*4=4 3*5=5 3*6=6 3*7=7 3*8=8 3*9=9<br>");
document.write("<br>");
document.write("4*1=1 4*2=2 4*3=3 4*4=4 4*5=5 4*6=6 4*7=7 4*8=8 4*9=9<br>");
document.write("<br>");
document.write("5*1=1 5*2=2 5*3=3 5*4=4 5*5=5 5*6=6 5*7=7 5*8=8 5*9=9<br>");
document.write("<br>");
document.write("6*1=1 6*2=2 6*3=3 6*4=4 6*5=5 6*6=6 6*7=7 6*8=8 6*9=9<br>");
document.write("<br>");
document.write("7*1=1 7*2=2 7*3=3 7*4=4 7*5=5 7*6=6 7*7=7 7*8=8 7*9=9<br>");
document.write("<br>");
document.write("8*1=1 8*2=2 8*3=3 8*4=4 8*5=5 8*6=6 8*7=7 8*8=8 8*9=9<br>");
document.write("<br>");
document.write("9*1=1 9*2=2 9*3=3 9*4=4 9*5=5 9*6=6 9*7=7 9*8=8 9*9=9<br>");
// 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>
Excel - 巨集
程式代碼:
Private Sub CommandButton1_Click()
For i = 1 To 10
Cells(1, i) = i
Next i
End Sub
java
程式代碼:
class Test
{
public static void main(String[] args)
{
System.out.println("1");
System.out.println("2");
System.out.println("3");
System.out.println("4");
System.out.println("5");
System.out.println("6");
System.out.println("7");
System.out.println("8");
System.out.println("9");
System.out.println("10");
}
}
JavaScript
程式代碼:
<html>
<head>
<title> The First Example: Hello, World </title>
</head>
<body>
<h2> This line is HTML </h2>
<script language="JavaScript">
<!--
document.write("1 2 3 4 5 6 7 8 9 10");
// 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>
JavaScript
程式代碼:
<html>
<head>
<title> The First Example: Hello, World </title>
</head>
<body>
<h2> This line is HTML </h2>
<script language="JavaScript">
<!--
document.write("1*1=1 1*2=2 1*3=3 1*4=4 1*5=5 1*6=6 1*7=7 1*8=8 1*9=9<br>");
document.write("<br>");
document.write("2*1=1 2*2=2 2*3=3 2*4=4 2*5=5 2*6=6 2*7=7 2*8=8 2*9=9<br>");
document.write("<br>");
document.write("3*1=1 3*2=2 3*3=3 3*4=4 3*5=5 3*6=6 3*7=7 3*8=8 3*9=9<br>");
document.write("<br>");
document.write("4*1=1 4*2=2 4*3=3 4*4=4 4*5=5 4*6=6 4*7=7 4*8=8 4*9=9<br>");
document.write("<br>");
document.write("5*1=1 5*2=2 5*3=3 5*4=4 5*5=5 5*6=6 5*7=7 5*8=8 5*9=9<br>");
document.write("<br>");
document.write("6*1=1 6*2=2 6*3=3 6*4=4 6*5=5 6*6=6 6*7=7 6*8=8 6*9=9<br>");
document.write("<br>");
document.write("7*1=1 7*2=2 7*3=3 7*4=4 7*5=5 7*6=6 7*7=7 7*8=8 7*9=9<br>");
document.write("<br>");
document.write("8*1=1 8*2=2 8*3=3 8*4=4 8*5=5 8*6=6 8*7=7 8*8=8 8*9=9<br>");
document.write("<br>");
document.write("9*1=1 9*2=2 9*3=3 9*4=4 9*5=5 9*6=6 9*7=7 9*8=8 9*9=9<br>");
// 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月12日 星期四
第二週 - 作業
程式設計工藝大師
作業1
程式代碼來源:http://taiwantc.com/js/js_tut_a1.htm
程式代碼:
<html>
<head>
<title> The First Example: Hello, World </title>
</head>
<body>
<h2> This line is HTML </h2>
<script language="JavaScript">
<!--
document.write("Hello, Eric_He.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>
作業2
程式來源:http://docs.oracle.com/javase/tutorial/getStarted/cupojava/win32.html
程式代碼:
/**
作業3
cmd代碼: ipconfig
作業4
代碼來源:http://www.hashemian.com/tools/visitor-IP.htm
代碼:
作業1
程式代碼來源:http://taiwantc.com/js/js_tut_a1.htm
程式代碼:
<html>
<head>
<title> The First Example: Hello, World </title>
</head>
<body>
<h2> This line is HTML </h2>
<script language="JavaScript">
<!--
document.write("Hello, Eric_He.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>
作業2
程式來源:http://docs.oracle.com/javase/tutorial/getStarted/cupojava/win32.html
程式代碼:
/**
* 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. } }
作業3
cmd代碼: ipconfig
作業4
代碼來源: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>
2015年3月5日 星期四
訂閱:
文章 (Atom)