Jump to content

how to hide the image tag


scvinodkumar

Recommended Posts

If you're trying to hide it and show it, you could use JavaScript.

 

<script type="text/javascript>
function hideImage(imageId){
  document.getElementById(imageId).style.display = "none";
}
function showImage(imageId){
  document.getElementById(imageId).style.display = "block";
}

// Or use one function to do both
function showHideImage(imageId){
  if (document.getElementById(imageId).style.display=="none"){
    document.getElementById(imageId).style.display = "block";
  }
  else{
    document.getElementById(imageId).style.display = "none";
  }
}
</script>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.