English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

what is the smallest amount of code necessary for image swapping in java script?

2006-08-07 08:40:28 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

function imageSwap(imgObj){
imgObj.src="newimg.jpg";
}

you can also do this inline like -

2006-08-07 08:47:23 · answer #1 · answered by John J 6 · 0 0



#MouseOver Code


border="0" vspace="0" hspace="0" src="../images/b.jpg">


If you want to avoid writing the array everytime, this is an excellent resource - http://www.quirksmode.org/js/mouseov.html

2006-08-07 15:51:41 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers