![]() |
Einführung in Javascriptvon Prof. Jürgen Plate |
| Bedingung |
if( Bedingung ) Anweisung1 [ else Anweisung2 ] |
| Fallunterscheidung |
switch( Bedingung ) { case Konstante1 : Anweisung [ case Konstante2 : Anweisung ] [ default : Anweisung ] } |
| Iterationsschleife |
for( [ Anfangsausdruck ]; [ Bedingung ]; [ Schrittweite ] ) Anweisung |
| Objekteigenschaftsschleife |
for( Variable in Objekt ) Anweisung |
| nichtabweisende Wiederholung |
while( Bedingung ) Anweisung |
| Iterationssprung | continue |
| Schleifenabbruch | break |
Zeichen | Bedeutung |
\b | Backspace |
\f | Formfeed |
\n | Linefeed |
\r | Carriage Return |
\t | Tabulator (horizontal) |
\\ | Backslash |
\' | einfaches Anführungszeichen |
\" | doppeltes Anführungszeichen |
\ddd | Zeichen aus Zeichensatz Latin-1 mit der Oktalzahl ddd |
\xdd | Zeichen aus Zeichensatz Latin-1 mit der Hexadezimalzahl dd |
\udddd | Zeichen aus Zeichensatz Unicode mit der Hexadezimalzahl dddd |
| Vorfahre | Objekt | Eigenschaften | Methoden | Ereignisse |
| window | defaultStatus length name opener parent self status top |
alert() blur() clearTimeout() close() confirm() focus() open() prompt() scroll() setTimeout() |
onBlur onError onFocus onLoad onUnLoad |
|
| window | history | legth | ||
| window | location | hash host hostname href pathname port protocol search |
||
| window | document | alinkColor bgcolor cookie fgcolor lastModified linkColor location referrer title URL vlinkColor |
||
| window | frames[] | length frame name parent self window |
||
| document | links[] | length | ||
| document | anchors[] | length | ||
| document | forms[] | length form action encoding method name target |
||
| document | applets[] | length applet name (Java-Applet) |
||
| document | images[] | length image border complete height hspace lowsrc name prototype src vspace width |
||
| forms[] | button | form name type value |
||
| forms[] | checkbox | checked defaultChecked form name type=checkbox value |
click() | onClick |
| forms[] | elements[] | length | ||
| forms[] | fileUpload | name value |
||
| forms[] | hidden | name type value |
||
| forms[] | password | defaultValue name type=password value |
focus() blur() select() |
|
| forms[] | radio | checked defaultChecked index length name type=radio value |
click() | onClick |
| forms[] | reset | name type value |
||
| forms[] | submit | name type value |
||
| forms[] | text | defaultValue name type value |
||
| forms[] | textarea | defaultValue name type=text value |
blur() focus() select() |
onBlur onChange onFocus onSelect |
| forms[] | select | length name selectIndex text type value |
||
| select | options[] | defaultSelected index length name prototype selected selectedIndex text value |
||
| Math | E LN2 LN10 LOG2E LOG10E PI SQRT1_2 SQRT2 |
|||
| navigator | appCodename appName appVersion userAgent |
|||
| navigator | mimeTypes[] | length mimeTypes name description suffixes |
||
| navigator | plugins[] | length plugin name filename description |
||
| plugins[] | mimeTypes[] | length mimeTypes name description suffixes |
||
| Date | prototype | getDate() getDay() getHours() getMinutes() getSeconds() getYear() getMonth() getTime() getTimezoneOffset() parse() setDate() setHours() setMinutes() setSeconds() setYear() setMonth() setTime() toGMTString() toLocalString() UTC() |
In diesem Skript konnte die Funktionalität von JavaScript nur ausschnittweise dargestellt werden. Wer tiefer in die Möglichkeiten der Sprache einsteigen will, kommt um weitere Literatur nicht herum:
R. Steyer:
JavaScript in 21 Tage
Verlag Markt & Technik
D. Flanagan:
JavaScript - Das umfassende Referenzwerk
Verlag O'Reilly
Netscape Developer Pages: http://developer.netscape.com/index.html
SELFHTML: http://www.teamone.de/selfhtml/selfhtml.htm
Kakao und Kekse: http://javascript.seite.net
Einführung der Uni Mannheim: http://rummelplatz.uni-mannheim.de/~skoch/js/script.htm
Einführung von Stefan Koch: http://www.geocities.com/Hollywood/4250/index.html
JavaScript Pro Forum: http://www.inquiry.com/techtips/js_pro/"