zoukankan      html  css  js  c++  java
  • 下面是小图,点一下上面就会出现大图

    http://bbs.blueidea.com/thread-2846567-1-1.html



    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    <style type="text/css">
    img
    { cursor:pointer}
    #big img
    { width:100px; height:100px;}
    </style>
    </head>
    <body>
    <script type="text/javascript">
    function change(a){
    var bigpic = document.getElementById("bigpic");
    if (a ==1){bigpic.setAttribute("src","http://www.chenbincb.com.cn/cnblogs/images/smile.gif")}
    if (a ==2){bigpic.setAttribute("src","http://www.chenbincb.com.cn/cnblogs/images/frown.gif")}
    if (a ==3){bigpic.setAttribute("src","http://www.chenbincb.com.cn/cnblogs/images/tongue.gif")}
    }

    </script>
    <div id="big">
    <img src="http://www.chenbincb.com.cn/cnblogs/images/smile.gif" alt="" id="bigpic">
    </div>
    <img src="http://www.chenbincb.com.cn/cnblogs/images/smile.gif" alt="" onclick="change(1)">
    <img src="http://www.chenbincb.com.cn/cnblogs/images/frown.gif" alt="" onclick="change(2)">
    <img src="http://www.chenbincb.com.cn/cnblogs/images/tongue.gif" alt="" onclick="change(3)">
    </body>
    </html>
  • 相关阅读:
    我的世界-大堆网易账号免费送!!
    P1016 旅行家的预算
    P1015 回文数
    P1014 Cantor表
    P1013 进制位
    谷歌浏览器插件分享-tampermonkey油猴
    C++逐字输出函数
    P1012 拼数
    Windows下Nginx的启动、停止等命令
    遇到REMOTE HOST IDENTIFICATION HAS CHANGED怎么办?
  • 原文地址:https://www.cnblogs.com/CB/p/1154254.html
Copyright © 2011-2022 走看看