User Tools

Site Tools


eg-259:homework:10

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eg-259:homework:10 [2007/10/18 17:59] eechriseg-259:homework:10 [2012/02/17 12:27] (current) eechris
Line 1: Line 1:
 +====== JavaScript and HTML Documents: Part 1 ======
 +
 +**Adapted from**: Robert W. Sebasta, Programming the World-Wide Web, 3rd Edition, Addison Wesley, 2006. **Supporting**: [[eg-259:lecture8|Contact Hour 11]]. 
 +
 +  - Modify the ''radio_click.html'' example from the [[eg-259:lecture8#handling_events_from_button_elements_example|lecture]] to have five radio buttons, labelled "red", "blue", "green", "yellow", and "orange". The event handlers for these buttons must produce messages stating the chosen favourite colour. The event handler must be a function, whose name must be assigned to the ''onclick'' attribute of the button elements. The chosen colour must be sent to the event handler as a parameter. 
 +  - Rewrite the document for Exercise 1 to assign the event handler to the event property of the button element. This requires the chosen colour to be obtained from the value property of the button element rather than through the parameter. 
 +
 +----
 +
 +[[eg-259:homework:home|More Homework Exercises]]