Chap 4.5
This chapter is dedicated to writing a Dom-based application. We'll also be learning how to change a node's style, create a user-friendly, dynamic application.
In this chapter, the game plan is to:
1.) Create a new file to store the page's JavaScript code
2.) Write a function that adds a CD to the Top 5 list when the CD's cover is clicked
3.) Add a ranking number to each CD, so users can see the order of the Top 5
4.) Write a function that clears the user's choices and starts over
...while writing a web page for rating the Top 5 blues CDs of all time.
In setting up the CD covers, when someone clicks on a CD cover image, we need the Top 5 page to run our addToTop5() function.
There are two ways to run this:
1.) Add onClick event handlers to every "img" element in top5.html
2.) Use JavaScript to programmatically add event handlers to all "img" elements
Creating an addOnClickHandlers() function will add event handlers to all the "div" elements in the "cds" div.
In order to run the event handlers as soon as the page loads, there is a "" element called onLoad(). This can be used to run a JavaScript function any time the page loads.
In this chapter, the game plan is to:
1.) Create a new file to store the page's JavaScript code
2.) Write a function that adds a CD to the Top 5 list when the CD's cover is clicked
3.) Add a ranking number to each CD, so users can see the order of the Top 5
4.) Write a function that clears the user's choices and starts over
...while writing a web page for rating the Top 5 blues CDs of all time.
In setting up the CD covers, when someone clicks on a CD cover image, we need the Top 5 page to run our addToTop5() function.
There are two ways to run this:
1.) Add onClick event handlers to every "img" element in top5.html
2.) Use JavaScript to programmatically add event handlers to all "img" elements
Creating an addOnClickHandlers() function will add event handlers to all the "div" elements in the "cds" div.
In order to run the event handlers as soon as the page loads, there is a "" element called onLoad(). This can be used to run a JavaScript function any time the page loads.

1 Comments:
Nice job with the chapter posts. Also, nice job keeping up with your schedule. Let's remember to get together about the time you are reading Chapter 7 to discuss a deliverable project.
Post a Comment
<< Home