The document.images[] array.
![]() |
![]() |
![]() |
Which cell do you wish to change? |
|
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
which picture? |
Images excerpted from Webster's New International Dictionary of the English Language, 1911.
<td><img src="r/r1.jpg" width="60" height="60"></td>
Note that the images have not been named (though they could be without affecting the script).
It has two forms. The first (the value of which is known as document.f.u.value) calls the function "doit()" whenever its value is changed.
The function doit merely chooses the element of the document.images[] array specified by the user's choice in the top form, and replaces its source file by the number selected in the bottom form.
function doit(){
v=document.g.v.value;
document.images[document.f.u.value].src="r/r"+v+".jpg";
}