eg-259:homework:10
This is an old revision of the document!
JavaScript and HTML Documents: Part 1
Adapted from: Robert W. Sebasta, Programming the World-Wide Web, 3rd Edition, Addison Wesley, 2006. Supporting: Lecture 8.
- Modify the
radio_click.html
example from the 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 theonclick
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/10.1295010030.txt.gz · Last modified: 2012/02/17 12:27 (external edit)