JavaScript
![]() |
Hello World (1) | Michael Neumann |
<html> <body onload="onload()"> <script language="JavaScript"> <!-- // JavaScipt in einer HTML-Seite eingebettet function onload() { document.writeln('Hello World'); } //--> </script> </body> </html> |
Gibt "Hello World" auf dem Bildschirm
aus. |
Hello World (2) | Gary Haran |
<html> <head> <title>Javascript Hello World</title> </head> <body> <script> document.write("Hello World!"); </script> </body> </html> |
Gibt "Hello World" auf dem Bildschirm
aus. |
Squares | Gary Haran |
<html> <head> <title>Javascript Squares</title> </head> <body> <script> for (var i = 1; i <= 10; ++i) { document.write( Math.pow(i, i) + "<br>" ); } </script> </body> </html> |
Gibt die Quadrate von 1 bis 10
aus. |