<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
</style>
</head>
<body>
<div id='box'>
<img id='img' style='width: 200px;height: 200px;' src='https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F4k%2Fs%2F02%2F2109242332225H9-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1664525452&t=d5b08339b62f58067a22ca6205be87b5'/>
<div id='globe'>🌏</div>
</div>
</body>
<!-- <script src='./login/plugin/jquery2.1.1.js'></script> -->
<script type="text/javascript">
window.onload = function() {
let imgs = [
'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F4k%2Fs%2F02%2F2109242332225H9-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1664525452&t=d5b08339b62f58067a22ca6205be87b5',
'https://img1.baidu.com/it/u=1966616150,2146512490&fm=253&fmt=auto&app=138&f=JPEG?w=751&h=500'
];
let flag = false;
let str = '🌏'
let index = 0;
let count = 0;
let $img = document.getElementById('img');
let $globe = document.getElementById('globe');
$img.onclick = function() {
index++;
flag = !flag;
count = index % 5;
if(flag) {
$img.src = imgs[1]
} else {
$img.src = imgs[0]
}
let nStr = str.repeat(count+1);
console.log(count)
$globe.innerText = nStr;
}
}
</script>
</html>