1.

How to assign the image source in JavaScript?(a) image = “url”(b) source(“url”)(c) image.src = “url”(d) img.src=”url”The question was asked by my college professor while I was bunking the class.My query is from Animation topic in portion Caching, Debugging and Animation of JavaScript

Answer»

Correct choice is (c) IMAGE.src = “URL

The BEST explanation: For accesing any image in WEBPAGE its address or url is specified. The image SOURCE is defined as image.src = “/images/html.gif”.



Discussion

No Comment Found

Related InterviewSolutions