Enhancements: JavaScript: Introduction
JavaScript can make your website more interactive and dynamic. The scripts are set to execute when something happens such as when the mouse moves over a button. They can even change the content of an HTML element.
Read JavaScript - General Introduction for some background information.
Complete the Introduction to JavaScript from W3 Schools.
JavaScript Lingo
Here's some technical language that might be useful as your learning JavaScript basics.
- A script is a set of directions that accomplishes a task.
- Objects are building blocks of the script
- Objects have properties (like adjective) that name, indicate size, and values.
- Objects have methods (like verbs) that do things like display text, record information.
- Events are actions the user performs to make things happen.
- Actions are things such as clicking a mouse that cause events.
- Event handlers are commands such as
- onClick - user clicked an object
- onLoad - objected finished loading
- onMouseover - moved over an object
- onMouseout - moved off an object
- onSelect - user select object
- onSubmit - user submitted a form
- onUnload - user left the window
- onClick - user clicked an object
- A variable is a storage container for a value and can't contain spaces or punctuation.
- An array is a set of variables saved under the same name.
- A value is a piece of information such as a number.
- A string is a character or set of characters such as a word expressed with quotes such as "Welcome".
- Operators go with variables to make things happen.
- Assignments are when you put a value on a variable such as store="Costco".
- A function is a set of statements under one name that perform a task. They are usually in the <head> area and are called as needed such as function testQuestion()
What is the Difference between DHTML and JavaScript?
DHTML (Dynamic HTML) can make your pages come alive. DHTML scripts are written in languages including JavaScript. It's really just a combination of techniques (i.e., JavaScript, HTML, and CSS) to make web pages dynamic. Some people consider DHTML as an advanced form of JavaScript. DHTML scripts are compatible with the newest generation of browsers while older JavaScript are sometimes incompatible with new browsers. However, DHTML is not a standard defined by W3C.
Skim Dynamic Drive for more information and DHTML scripts.
Explore the DHTML Tutorial from W3Schools.