<title>My Example</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
$( "button" ).click( function() {
$( "img" ).attr( "src", "/pix/samples/10m.jpg" );
<p><button>Change Image</button></p>
<img src="/pix/samples/8m.jpg" alt="Photo of bird">