博主首页

html图片点击进行刷新

<body>
    <img id="img1" src="http://127.0.0.1:8081/t1/img" onclick="updateImg1()">
</body>


<script>
    function updateImg1(){
        $("#img1").attr("src","http://127.0.0.1:8081/t1/img?t1"+new Date());
    }


</script>

 

posted @ 2024-02-19 14:53  笑~笑  阅读(24)  评论(0编辑  收藏  举报