<html>
<body>
<center>
<h1>La mia immagine</h1>
<p id="tempo"></p>
<img id="uno" src="img/immagine.jpg"
style="width:400px; height:200px; margin:50px; padding:10px; border: 1px solid black">
<button onclick="setTimeout(myFunction, a)">Inizia</button>
</center>
<script>
var a =Math.random()*10000/2;
document.getElementById('tempo').innerHTML=a;
function myFunction() {
document.getElementById('uno').src='img/win1.jpg';
}
</script>
</body>
</html>