Procedural programming are scripts or compiled code that runs through the instruction set as soon as the programme is loaded and run
Event Driven programming is where the user triggers the action, rather than it happening automatically (eg when the programme is loaded)
- the actual programming for the event is still procedural/ OOP
eg Javascript & HTML
An HTML event can be something the browser does, or something a user does.
Here are some examples of HTML events:
- An HTML web page finished loading
- An HTML input field was changed
- An HTML button was clicked
Javascript then carries out the required action
- Visit the W3Schools page to practice:
- what are the common events in HTML?
- what are the common event handlers in JS(HTML)?
- what do they do?
- Write down the answers to create your own notes
- Try the TEST (opens in a new tab)(3 questions)
- Look at the full range of event handlers
- Write down 6 that look fun!
- click the event name to see what it does
- try the example & make a note