2015年4月28日 星期二

2015.03.20

java
public class Loop1to10 {
public static void main(String[] args) {
for(int i = 1; i < 11; i++)
System.out.print(i + " ");
}
}


javascript
<html>
<head>
<title> The First Example: 1to 10 </title>
</head>
<body>
<h2> This line is HTML </h2>
<script language="JavaScript">
<!--
document.write("1,2,3,4,5,6,7,8,9,10.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>


沒有留言:

張貼留言