Book
Submodule 6.1: The model of event-driven programming
Submodule 6.1: The model of event-driven programming
Completion requirements
View
- Function
- Event
- External Javascript file
- JavaScript - HTML methods to execute events
Exercise
Exercise
- Create two new folders in the folder "yourNameWEB2JS ". The first one is the "css" folder and the second is the "js" folder.
- Open your editor, create a new file and save it as
exersice06.1.html
in the folder "yourNameWEB2JS
". Copy the HTML code and paste it in this file. - Create a new file and save it as
mystyle.css
in the folder "css". Copy the CSS code and paste it in this file. - Create a new file and save it as
myscript.js
in the folder "js". Copy the JavaScript code and paste it in this file. - Save all these files and preview the HTML file in your editor or your browser. Does everything appear right?
- You could add some CSS rules for more attractive appearance.