Project I: Dynamically Selecting Multiple Form Fields
Here is the portion of the HTML page that contains the form named promotion, which holds the newsletter questions. It contains 10 checkboxes named content1 through content10 as well as a button that the user will click on to select all of the checkboxes.
<td class="blkText"> <table border="0" cellpadding="5" cellspacing="0"> <tr> <td valign="top" align="left" class="blkText"> <input type="checkbox" name="content1" value="trends">Dirt<br> <input type="checkbox" name="content2" value="models">Moeny<br> <input type="checkbox" name="content3" value="designers">Trends<br> <input type="checkbox" name="content4" value="rage">Haute<br> <input type="checkbox" name="content5" value="gossip">Street<br><br> ...
Get Essential JavaScript™ for Web Professionals, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.