Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3483626
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:41:46+00:00 2026-05-18T10:41:46+00:00

I use this code to make a onmouseover change pictures. but in IE it

  • 0

I use this code to make a onmouseover change pictures. but in IE it works, in firefox it shows wrong, where is the problem? And can anyone add a onmouseout function that return to the first picture for me? Thanks.

<script type="text/javascript">
function changeimage(rel){
document.getElementById("image").src=rel;
}
</script>
<img src="img1.jpg" id="image" />
<a onmouseover="changeimage('img1.jpg')" rel="img1.jpg">img1</a>
<a onmouseover="changeimage('img2.jpg')" rel="img2.jpg">img2</a>
<a onmouseover="changeimage('img3.jpg')" rel="img3.jpg">img3</a>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:41:47+00:00Added an answer on May 18, 2026 at 10:41 am

    you can use:

    <script type="text/javascript">
    function changeimage(rel)
    {
        var img = document.getElementById("image");
        img.setAttribute("orig", img.src);
        img.src=rel;
    }
    
    function SetOriginal()
    {
        var img = document.getElementById("image");
        img.src = img.getAttribute("orig");
    }
    </script>
    <img src="img1" id="image" />
    <a onmouseover="changeimage('img1')" onmouseout="SetOriginal()" rel="img1">img1</a>
    <a onmouseover="changeimage('img2')" onmouseout="SetOriginal()" rel="img2">img2</a>
    <a onmouseover="changeimage('img3')" onmouseout="SetOriginal()" rel="img3">img3</a>
    

    to return to the original image.
    I tested this on firefox(3.6.12) and it is working

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use this code to make the transition between a subview and another but
First off I use this code to make the navigation bar always stay fixed;
I make call from my app with this code (i use webview because after
I use this code to connect to SQL Server 2012, but it does not
I use this code to update data in database table. Can reuse same code
i use this code to split a data to make a list with three
I use this code to make figures in Sweave <<label=fig1plot, include=FALSE >>= plot(cars) @
i use this code for exporting gridview to Excel in asp.net - c# .....but
Greetings great SO comrades; I'm trying to use this code to make changes to
To make bounding box i use this code: 'vtk_bounding_box': function(data) { if ((browser ==

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.