Introducing JavaScript
- HTML is the content.
- CSS is the presentation.
- JavaScript is the behavior (makes your pages 'interactive' for the user).
What can you do with JavaScript? Here are just a things you can do...
-
Use JavaScript to respond to events (event handling).
-
Use JavaScript to validate user input.
Enter a number:
Please enter a NUMBER
-
Use JavaScript for animation.
-
Use JavaScript to fetch data from a web server.
(Note: This code is not actually fetching data from a server, it's just a simulation.)
-
Use JavaScript to control the elements in an HTML page.