MCQs > IT & Programming > DHTML > You have a function to change the image with id im… function changeimg(givenImg) { document.getElementById('imageID').src=givenImg } How would you make the webpage display 'image2.gif', only for the time that the user clicks the image?

DHTML MCQs

You have a function to change the image with id im…

function changeimg(givenImg)
{
document.getElementById('imageID').src=givenImg
}

How would you make the webpage display "image2.gif", only for the time that the user clicks the image?

Answer

Correct Answer: <img id="imageID" src="image1.gif" width="50" height="60" onmousedown="changeimg(image2.gif)" onmouseup="changeimg(image1.gif)">

Explanation:

Note: This Question is unanswered, help us to find answer for this one

DHTML Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

DHTML Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it