Monday, August 11, 2014

Image Animation Using JAVA SCRIPT

JavaScript is the most popular programming language in the world. This page contains some examples of what JavaScript can do in HTML. The HTML DOM (the Document Object Model) is the official W3C standard for accessing HTML elements. You can use JavaScript to: Change HTML elements Delete HTML elements Create new HTML elements Copy and clone HTML elements
Click above.....

I will show How it Works......
Here is the source code....

<!DOCTYPE html>
function changeImage() {
    var image = document.getElementById('myImage');
    if (image.src.match("2031"))
        image.src = "IMG_2032.jpg";
    } else
        image.src = "IMG_2031.jpg";
<img id="myImage" onclick="changeImage()" src="IMG_2031.jpg" width="700" height="380">
<p>Click the Picture to see the Next one</p>


Change the bolded words with your image link and find out how it works.....



Post a Comment