//just this part below is a problem
sector1red = new Image();
sector1red.src = "sector1red.bmp";
if (speed == 3) {
document.getElementById("sector1").src = sector1red;
}
when speed hits 3, i want "sector1red.bmp" to replace "sector1white.bmp" in the div tag.
is this the right way to display a picture there or what is wrong?
2007-07-02
01:47:19
·
3 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design
sorry, here is the correction for the get Element method
document.getElementById ("sector1").src = sector1red;
2007-07-02
01:48:38 ·
update #1