标签: javascript html
<button onclick="myFunction()">Try it</button> <script> function myFunction() { document.getElementById("myImg").src = "hackanm.gif"; } </script>