(2. 50 points).The HTML page shown to the far LEFT contains a form named p2_form; a texarea named ta; and a button labelled "GO" that when clicked executes the javascript function named p2. The textarea contains the value of PI with 10,000 digits (9,999 to the right of the decimal).
When the "GO" button is clicked, the function p2 examines the all the digits to the right of the decimal. An HTML table is produced (see at LEFT) on-the-fly that shows:
1. each digit 2. the frequency of each digit (0 through 9) following the decimal place 3. a bar graph of the results by using 1 pixel file g1x1.gif. The width of each bar is the frequency of the digit DIVIDED by 10 and the height is 10 pixels. 4. the minumum and maximum frequencies and where they occurShow only the javascript code for p2. |