Play Spot the Difference Online - Free HTML Game
<!DOCTYPE html>
<html>
<head>
<title>Spot the Difference Game - Free Online</title>
</head>
<body>
<div>
<h1>Spot the Difference Game</h1>
<img src="https://images.unsplash.com/photo-1499084732479-de2c02d45fcc?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1050&q=80" alt="Picture One" width=500px>
<img src="https://images.unsplash.com/photo-1499084732479-de2c02d45fcc?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1050&q=80" alt="Picture Two" width=500px>
</div>
<script type="text/javascript">
let score = 0;
function checkAnswer(){
let answer = prompt("What is the difference between the two pictures?");
if(answer == 'The second picture has a yellow bird in the top right corner'){
score ++;
alert("Correct! You scored " + score);
} else {
alert("Incorrect! You scored " + score);
}
}
checkAnswer();
</script>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/lnuF 著作权归作者所有。请勿转载和采集!