jiqing9006
<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<body>
    <script>
    function changeImage() {
        element = document.getElementById(\'myimage\');
        if (element.src.match("bulbon")) {
            element.src = "./images/pic_bulboff.gif";
        } else {
            element.src = "./images/pic_bulbon.gif";
        }
    }
    </script>
    
    <img id="myimage" onclick="changeImage()" border="0" src="./images/pic_bulboff.gif" width="100" height="180">
    <p>点击灯泡 开/关 灯</p>
</body>

</html>

分类:

技术点:

相关文章:

  • 2021-04-21
  • 2022-01-05
  • 2022-01-11
  • 2022-02-06
  • 2022-02-23
  • 2021-05-17
  • 2021-10-26
  • 2021-06-04
猜你喜欢
  • 2022-01-17
  • 2022-12-23
  • 2022-01-12
  • 2021-12-22
  • 2022-12-23
  • 2021-12-09
  • 2022-02-10
相关资源
相似解决方案