|
1. (50 points) Forbe's magazine's "Top 100 Places for Millennials to Work" is condensed in the textarea to the left (see source here) . This textarea is named ta1 and is contained in a form named f1. The data contains the information on each of the Top 100 companies as follows:
rank followed by a ";" (ranks are 1 → 100)
Show only the javascript for p1. this is the DIV block with id="p1_out"
|
2. (50 points) The first textarea to the left is named ta2 and is inside a form named f2. The textarea contains a string of the 147 named HTML colors separated by commas. The second textarea to the left is named ta3 and is also in the form named f2. It contains the red, green and blue intensity values for each of the 147 named colors. This textarea has 441 values (3 x 147), all separated by commas. Each named color is made up of three components: red, green and blue intensities:
1. for each color (0 → 146), check the red, green and blue components. If any of the three components has an intensity value of 255, then make a new row in the table: a) in the first column, display the color name
<td bgcolor='color-name-goes-here' width='50'> </td>
c) in the third column show the red intensity value (a value between 0 → 255) 2. Place the resulting table in the DIV block with id="p2_out" followed by the count of colors with at least one r,g,b value that is equal to 255. Show NO HTML. Show only the javascript for p2.
this is the DIV with id="p2_out"
|