<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <input type="button" value="点击更换图片" id="btn"><br>
    <img src="https://xn--xu0a.cn/api/dn" id="pic">



    <script>
        var btn = document.getElementById('btn');
        var pic = document.getElementById('pic');
        var num = 1;
        btn.onclick = function(){
            if(num === 1){

            pic.src = "https://xn--xu0a.cn/api/sj";
            num = 2;

            }else{

            pic.src = "https://xn--xu0a.cn/api/dn";
            num = 1;
        }

        };


</script>
</body>
</html>

2023-07-13T08:23:40.png
2023-07-13T08:23:56.png