![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
pic1 = new Image(); pic1.src = 'btn1.GIF'; pic2 = new Image(); pic2.src = 'btn2.GIF' function swapImage(btnID){ if(document.getElementById(btnID).src == pic1.src) document.getElementById(btnID).src = pic2.src; else document.getElementById(btnID).src = pic1.src; } |
#2
| |||
| |||
|
|
Be careful with that. The .src property of an image includes the full URL to the file. Not just the filename itself. |
![]() |
| Thread Tools | |
| Display Modes | |
| |