Java Script Practice–Steve Sun

Link: http://imanas.shanghai.nyu.edu/~ds5665/week3(2)/practise.html

at first the website didn’t change when i refreshed it and i changed the browser and problem solved.

and also i put two pictures (both left and right) into the html and each button worked for a picture individually. then i realized there should only be one picture with a certain id while the source may change. which means it was the same <img>, but the source was changed. so i can control the image belonging to that certain id with a button, what ever the source was.

then i tried to change the caption back with the same button that changed the caption. with the help from the LA i managed to do that with variable and if/else tags. and i figured that the same technique can be applied to changing the image.

Leave a Reply