Weeks 12 - 15
Selected topics:
Dynamic HTML and rewriting pages: document.write and innerHTML
Assignment #7 -- due Monday April 21st
Create a page containing four image tags, a standard input (named "n" with a default value of 1) and a button. The images tags will each contain a picture of one of six possible dice outcomes: the numbers one through six.. When the user clicks on the button, all dice are rolled (n.value) times. For each roll of a die, the src of the image tag is replaced with a random one of six possible pictures -- each picture being chosen with equal probability (1/6).
Results of the dice rolls should be kept in a textarea at the bottom of the page. A button below that text area, should allow the user to obtain a report (perhaps overwriting the contents of the text area) which tabulates the frequency of each of the six outcomes plotted separately for each of the dice. You may use the template shown here, but design your own dice.
2nd Quiz: Wednesday April 16th
Final Exam --
Section 02 - (Period 2): Wednesday May 7, 8:00 am - 10:00 am in 230 ATSH
Section 03 - (Period 5): Monday May 5, 2:00pm - 4:00 pm, in 230 ATSH
New link: About time
The stuff I worked on in class (and another version)
Assignment #8 - due last day of class.
Make a page with six different image tags and a form containing two buttons and a input named "a" and a textarea named "t".
Whenever someone clicks the button on the left, start a timer. Whenever someone clicks the button on the right, show how much time elapsed between the clicks of the two buttons.
and (for extra credit): When the page loads, start a script which times how long it takes for each of the images to load. Display the results in side the textarea.