Javascript点击图片后切换图片

Javascript点击图片后切换图片

<img src="https://ts1.cn.mm.bing.net/th?id=OIP-C.xsA-3qUw6cqmd8nRfxk6TQHaEK&w=215&h=110&c=8&rs=1&qlt=90&o=6&dpr=1.25&pid=3.1&rm=2" id="and">

    <script>
        function fun() {
            var and=document.getElementById("and")
            and.src="https://ts1.cn.mm.bing.net/th?id=OIP-C.rHuc8SKa0wLVwCqqA27uIwHaEt&w=193&h=110&c=8&rs=1&qlt=90&o=6&dpr=1.25&pid=3.1&rm=2"
        }
        
    script>

你可能感兴趣的:(html,JavaScript,javascript,css3,前端)