|
What it is:
Nothing to do with Java, the programming language.
A set of instructions for controlling the Web browser. Somewhat like a programming language, but far less robust.
Does require programming, although not quite as simple as HTML.
Tied closely with HTML. Where HTML controls text and layout, JavaScript lets users interact more.
Scripts are embedded right in the page HTML, and executed on the fly.
Useful for things like browser-detect, enhancing the interface.
Jscript: Microsoft's version of JavaScript. (Although IE also supports some JavaScript) Also:
VBScript is another Microsoft scripting (Visual Basic) that works in browsers as well as the OS.
Cons:
Not so easy to program.
Very buggy--browsers crash a lot.
Lots of bad JavaScript out there, users don't like it.
Users often turn it off.
Pros:
Lots of examples out there--easy to cut-and-paste.
Cheap/Simple way to add interactivity.
Examples:
Scientific American: Rollovers
A popular JavaScript Trick. Works by overlaying images on top of another--really an illusion.
IBM: Menus
Similar to rollovers, but far more complicated.
I/US: Menus
Another menu trick...but not as well thought out
ABCNews: Quick Quiz
Interesting use, demonstrates how JavaScript interacts with HTML
Resources:
JavaScript 101
JavaScript User
JavaWorld Beginners
JavaScripts.Com Lots of sample scripts
|