Here i am going to post a simple code that will help you to change the IMAGE SRC[SOURCE] ie, the script will change the displayed image dynamically in to another by clicking the hyperlink.
Grab the code here
<html>
<head><title>Change image SRC</title>
<script type="text/javascript">
function replaceImage(e) {
var image = document.getElementById('image');
image.src = 'http://www.mistonline.in/images/my-logo.png';
return false;
}
</script>
</head>
<body>
<a href='#' onClick='replaceImage();' title='Reload image'>Reload Image</a>
<img id="image" src='http://www.mistonline.in/images/another_my-logo.png'/>
</body>
</html>
You will also be interested in ,
- Removing Nodes using javascript
- Change input value from uppercase to lowercase using javascript
- Adding a draggable div along with the cursor using simple javascript
- Change webpage background color using javascript
- Close Event In Javascript For Firefox, IE and Chrome
- Javascript webpage load timer, display time taken to load a webpage
- Disabling right click menu using javascript
- Insert text and smilies in to textarea using javascript
- Get browser window size using javascript
- Write data to a page using javascript


