Computer Science 180
Web Design
Fall 2011, Siena College
Lecture 14: More JavaScript
Date: Wednesday, October 26, 2011
Agenda
- Announcements
- Reminder: keep your attention here (this means you,
under-the-desk phone users)
- Lecture assignment 12 recap
- Your course web page style redesigns
- A closer and more careful look at Lecture 13 JavaScript examples
- A closer and more careful look at the examples from Lab 6
Lecture Assignment 14
Due at the start of class, Friday, October 28.
Please submit answers to these questions
either as a hard copy (typeset or handwritten are OK) or by email to
jteresco AT siena.edu by the start of class. Please use a clear subject line
when submitting by email (e.g., CS 180 Lecture
Assignment 14, Joe Student). We will discuss these
questions at the start of class, so no late submissions are
accepted.
Consider the class example functionstylemore.html as you
answer these questions.
- When someone clicks on the "Press Here!" button, what values
are given to the three function parameters id, txt, and
color, and why? (2 points)
- Rewrite the function to use the names p1, p2, and
p3 for the parameters. (3 points)
- What is the advantage of the original parameter names as opposed
to p1, p2, and p3? (2 points)
- Modify the original version of the function to take a fourth
parameter that would set the background color of the same element
whose text and color are already being changed. (3 points)
Links