zoukankan      html  css  js  c++  java
  • QQ表情的添加

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8" />
    <title>QQ表情选择</title>
    <script src="../../js/jquery-3.3.1.min.js"></script>
    <style type="text/css">
    *{margin: 0;padding: 0;list-style: none;}

    .emoji{margin:50px;}
    ul{overflow: hidden;}
    li{float: left; 48px;height: 48px;cursor: pointer;}
    .emoji img{ cursor: pointer; }
    </style>
    <script>
    $(function () {
    //需求:点击qq表情,将其追加到发言框中
    $("ul img").click(function () {
    $(".word").append($(this).clone());
    });
    });



    </script>

    </head>
    <body>
    <div class="emoji">
    <ul>
    <li><img src="img/01.gif" height="22" width="22" alt="" /></li>
    <li><img src="img/02.gif" height="22" width="22" alt="" /></li>
    <li><img src="img/03.gif" height="22" width="22" alt="" /></li>
    <li><img src="img/04.gif" height="22" width="22" alt="" /></li>
    <li><img src="img/05.gif" height="22" width="22" alt="" /></li>
    <li><img src="img/06.gif" height="22" width="22" alt="" /></li>
    <li><img src="img/07.gif" height="22" width="22" alt="" /></li>
    <li><img src="img/08.gif" height="22" width="22" alt="" /></li>
    <li><img src="img/09.gif" height="22" width="22" alt="" /></li>
    <li><img src="img/10.gif" height="22" width="22" alt="" /></li>
    <li><img src="img/11.gif" height="22" width="22" alt="" /></li>
    <li><img src="img/12.gif" height="22" width="22" alt="" /></li>
    </ul>
    <p class="word">
    <strong>请发言:</strong>
    <img src="img/12.gif" height="22" width="22" alt="" />
    </p>
    </div>
    </body>
    </html>
  • 相关阅读:
    git 简单操作
    JS中substr与substring的区别
    手写map, filter函数
    node之pipe
    nodejs之child_process
    node真的是单线程模式吗
    【xinsir】分享一个查找文件的脚手架
    【xinsir】函数库,持续更新
    数组循环方法统计
    20190916
  • 原文地址:https://www.cnblogs.com/newcityboy/p/11520904.html
Copyright © 2011-2022 走看看