Javascript swap 2 images

I'm busy with a project but know I'm stuck at some point. What I want to do is, when someone presses the home button, it changes its color. What I wanted to do is a **swap from image 1 (white) to image 2 (blue)**. So the person can see on which page he/she is. But when I put this code into the website, it won't show anything. When I press 2 times it will show the blue image. And when I press many times you see the white and blue image swapping. But it won't stand on the white image, only on the blue image Here is the code I use. --> createUrl("/admin/survey/sa/index"); ?>" onclick="edit()">home.png' alt='eT("Default administration page");?>' />
When you click the home button you're always redirected to the '/admin/survey/sa/index'. That page has the home.png default image. Your javascript updates the image BEFORE you are redirected so that modification will not stay when the page redirects

以上就是Javascript swap 2 images的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准