JavaScript is a very useful tool that can give your website a more user friendly feel by reacting to your visitors actions in your website. So do you need JavaScript? Not absolutely, but it might make the difference between a good website and a great website.
JavaScript is a programming language, or more accurately a scripting language, that is executed inside your web browser. It can be programmed to respond to mouse movement and commands, keyboard input, and can process this input to do many useful things. Some examples of JavaScript in action that you probably see every day are:
- Menu buttons that change when your mouse rolls over them.
- Error messages that pop up when a form is not filled in correctly.
- Web pages that change without getting a new page.
- Photo gallerys that scroll and fade.
JavaScript can even be programmed to make your browser look like a PC application. Google's Gmail is a good example of this. With JavaScript very rich user experiences can be created.
Probably the most dramatic affects that can be created with JavaScript is when it is combined with CSS (Cascading Style Sheets). Since JavaScript has access to the entire DOM (Document Object Model), of which CSS is a component, JavaScript can significantly modify the look and feel of your website based on the actions of your visitor.