Media (JavaScript Events)
DUE Wednesday, Apr 11 – 5 points
(Thursday NOON deadline)
This week, we will be discussing JavaScript. When you use JavaScript on a web page, you are building functions of code that respond to events triggered by users’ interacting with elements on a web page. These videos provide a fairly good introduction to how these events are triggered. These videos are a little more technical than those from yesterday, but hopefully they don’t make anyone cry.
- Events – Overview (3:51) by OG Solution
- Events – onclick (4:06) by OG Solution
- JavaScript 101 – day 3 – simple rollover effects (1:16) by MindsEdge2006
- JavaScript External File (3:50) by OG Solution
- JavaScript Big Picture (5:58) by OG Solution
Once you have watched or read these materials, you will need to take a quiz of ten true-false questions. (These questions will be randomly selected from the questions below. You can retake the quiz up to five times. Don’t stress about getting 100% on these quizzes: if you get 80% or better, you will be ready to proceed to the next activity and I will give you full credit.)
All questions should be prefaced with an understood, “According to the author of the material … “:
- T/F? A JavaScript “event handler” is a piece of code connected to an HTML element that responds to an interaction related to that particular element.
- T/F? In the “General” overview video, OG Solution mouses over the email box to trigger an event.
- T/F? In the “General” overview video, OG Solution selects a color from a dropdown field to trigger an event.
- T/F? In the “General” overview video, OG Solution right clicks on a large red box to trigger an event.
- T/F? JavaScript event handlers can be added to HTML elements as if they were attributes, using syntax like this — <h2 onclick=”alert();”>
- T/F? Clicking on an HTML element triggers an “onclick” event.
- T/F? Hovering your mouse over an HTML element triggers a “mouseHoverOver” event.
- T/F? MindsEdge2006 uses the “onchange” and “onclick” event handlers to show how to change an image on a web page.
- T/F? JavaScript can be placed in external file in a fashion similar to CSS; the code is different but the concept is the same.
- T/F? CTRL+S is a keyboard shortcut on Windows for viewing the source of a JavaScript file.
- T/F? JavaScript files typically end with a “.js” extension.
- T/F? You must add the <script> tag to an external JavaScript file.
- T/F? JavaScript is a full programming language.
- T/F? According to OG Solution, JavaScript is incredibly difficult.
- T/F? In the “Big Picture” video, OG Solution uses the Yahoo! home page as an example of a web page with JavaScript events.
- T/F? JavaScript can access the HTML elements on a web page through an interface known as the “Document Object Model.”
- T/F? The abbreviation for the Document Object Model — DOM — is pronounced as a single word that rhymes with “foam” and “Rome.”
- T/F? In the DOM, the entire web page is represented as a “document” node in the tree.
- T/F? OG Solution describes an HTML tag inside another HTML tag (like <title> inside <head>) as a “child”.
DUE Wednesday, Apr 11 – 5 points
(Thursday NOON deadline)