CST 336 - Module 2

 Week 2,

This week in internet programming, we were introduced to incorporating scripts to our web pages.


The scripting language we use here is JavaScript and the material for this module serves as a refresher on using JavaScript and shows how to use it in the context of a web page. To use a javascript file with a web page, the HTML file needs to include a script tag with the source being the JavaScript file you want to use. Within the JavaScript file, you can select specific elements from the HTML file you would like to use to perform tasks. One common example, which was used in this week’s assignment is the quiz, where the main goal was to take the user inputs and grade the quiz.


The tasks themselves are implemented by using event handlers which listen for certain actions to be performed, such as on an element's value changing or being clicked on. These are important because we need to know what the user clicks or changes after the page has already loaded. Using the quiz example for instance, once the page loads, the user will be shown questions with a variety of input boxes that can be interacted with to allow the user to give an answer to the questions. Then grade only when the user submits the quiz.

Comments

Popular posts from this blog

CST 300 - Module 4

CST 338 - Module 4

CST 300 - Module 6