|
Helping ordinary people create extraordinary websites! |
Essential Javascript -- A Javascript TutorialBy Patrick Hunlock2007-12-02
Javascript is an Event Driven Language As you can tell from the input examples, Javascript is an event driven language which means your scripts react to events you set up. Your code isn't running all the time, it simply waits until an event starts something up! Going into all the Javascript events is beyond the scope of this document but here's a short-list of common events to get you started.
These events can be attached to most any HTML tag or form element. Of them all onClick will probably be what you end up using most often. Tutorial Pages: » Essential Javascript -- A Javascript Tutorial » Getting Started » In-Line Javascript » External Javascript » Javascript is case sensitive » Output (writeln) » Output (alert) » Output (getElementById) » Input (One Click To Rule Them All) » Input (User Input) » Javascript is an Event Driven Language » Comments » Variables » Variable Scope » Special Keywords » Arithmetic Operators » Logical and Comparison Operators » JavaScript Conditionals: IF » JavaScript Conditionals: SWITCH » JavaScript Conditionals: Shorthand Assignment » JavaScript Conditionals: Ternary Operators » JavaScript Loops: FOR » JavaScript Loops: FOR/IN » JavaScript Loops: WHILE » Bringing It All Together » DHTML: Dynamic HTML » Conclusion copyright © 2006, 2007 by Patrick Hunlock |
|