JavaScript
User Driven Events
What's JavaScript?
Also known as EcmaScript. It's major aim is to allow users interact with HTML elements. It majorly allows page interactivity.
Example If you click on button, you would require to view confirmation dialog and accept yes or no. Also for form inputs, you need to validate user inputs like strong passwords can be validated in JavaScript.
JavaScript in HTML
Just like Css in HTML, there are three ways of adding javascript in HTML:
Embedded Scripts
External file scripts
Note
The button in both codes above has an event onClick
that recognises the button has been clicked by a user and issues an alert dialog box.
What You Will Learn
Let's give users freedom
Last updated
Was this helpful?