Img

by Rapha Souza

HTML

<script src="https://code.jquery.com/jquery-3.4.1.slim.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css">
<table style="width:100%">

  <tr>
    <td id="ct0"><img id="img" alt="IMG" ></td>
  

  </tr>
    <tr>
    
    <td id="t1">
      
      <img  id="imgThumb" alt="IMG Thumb" >
      
      
    </td>
   
  </tr>
  



</table>


<button type="button" class="btn btn-danger" onclick="luizBaitola()">
Carrega IMG
</button>

CSS

table, th, td {
  border: 1px solid black;
  border-collapse: collapse;
}
th, td {
  padding: 5px;
  text-align: left;    
}

JavaScript

function luizBaitola(){


//$("#img").prop("src", 'https://wallpapercave.com/wp/bJZlhfn.jpg', "width", "500px")
$("#img").prop({"src":'https://wallpapercave.com/wp/bJZlhfn.jpg', "width":500})


$("#imgThumb").prop({"src":'https://wallpapercave.com/wp/bJZlhfn.jpg', "width":100})

}