Image 'src' Property : Image Img : HTML JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » HTML » Image Img »

 

Image 'src' Property



    
<html>
<body>
<img id="myImg" 
     src="" 
     alt="" onClick="function1();">
<button onclick="function1();">Click here to load image</button>
<script language="JavaScript">
    function function1() {
        document.all.myImg.src = "http://www.navioo.com/style/logo.png";
    }
</script>
</body>
</html>

    
      
      



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo HTML
» Image Img