lundi 31 mai 2021

How can I have infinite clicks on my button because after i click the button it does not work anymore

<script type="text/javascript">

    //this will make it appear
    function showPicture() {
      var sourceOfPicture = "img/tierlist.jpg";
      var img = document.getElementById('tierlist')
      img.src = sourceOfPicture.replace('90x90', '225x225');
      img.style.display = "block";
    } 

    // this will remove the picture
    function removePicture() {
      var image_x = document.getElementById('tierlist');
      image_x.parentNode.removeChild(image_x);
      img.style.display = "block";
    } 
</script>

I want it to have an infinite amount of clicks and not just a one and done button, how do I do it?




Aucun commentaire:

Enregistrer un commentaire