Bureaucrats, emailconfirmed
1,221
edits
m (querySelector) |
m (→Hallo Welt: : Actionscript bezug rausgenommen: stimmt nichtmehr für AS3) |
||
Line 3: | Line 3: | ||
JavaScript ist eine clientseitige Programmiersprache. Der Quellcode wird im Klartext an den Browser übertragen und erst dort (im Browser des Surfers) interpretiert und ausgeführt. Im Gegensatz dazu ist [[PHP]] eine serverseitige Programmiersprache. | JavaScript ist eine clientseitige Programmiersprache. Der Quellcode wird im Klartext an den Browser übertragen und erst dort (im Browser des Surfers) interpretiert und ausgeführt. Im Gegensatz dazu ist [[PHP]] eine serverseitige Programmiersprache. | ||
Auch Director, Acrobat-PDFs und viele andere Dokumente und Programme unterstützen JavaScript. | |||
<source lang="html4strict" line start="1" highlight="8"> | <source lang="html4strict" line start="1" highlight="8"> | ||
Line 32: | Line 32: | ||
</source> | </source> | ||
Javascript benutzt eine Syntax, die C, C++ und Java ähnlich ist: {} umschließen Anweisungsblöcke; Das Semikolon schließt einen Ausdruck ab. Nach einem Zeilenumbruch wird u.U. während der Ausführung automatisch ein Semikolon eingefügt ([http://inimino.org/~inimino/blog/javascript_semicolons Regeln dafür]). Trotzdem sollte man die Semikola nach einem Ausdruck schreiben und sich nicht auf die Automatik verlassen. Leerzeichen sind unrelevant. | Javascript benutzt eine Syntax, die C, C++ und Java ähnlich ist: {} umschließen Anweisungsblöcke; Das Semikolon schließt einen Ausdruck ab. Nach einem Zeilenumbruch wird u.U. während der Ausführung automatisch ein Semikolon eingefügt ([http://inimino.org/~inimino/blog/javascript_semicolons Regeln dafür]). Trotzdem sollte man die Semikola nach einem Ausdruck schreiben und sich nicht auf die Automatik verlassen. Leerzeichen sind unrelevant. | ||
== Einbinden von JavaScript in HTML-Dateien == | == Einbinden von JavaScript in HTML-Dateien == |