zoukankan      html  css  js  c++  java
  • amazeui 搜索 动态

    <!doctype html>
    <html class="no-js">
    <head>
      <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <title>Amaze UI Admin 404 Examples</title>
      <meta name="description" content="这是一个404页面">
      <meta name="keywords" content="404">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <meta name="renderer" content="webkit">
      <meta http-equiv="Cache-Control" content="no-siteapp" />
      <link rel="icon" type="image/png" href="assets/i/favicon.png">
      <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
      <meta name="apple-mobile-web-app-title" content="Amaze UI" />
      <link rel="stylesheet" href="assets/css/amazeui.min.css"/>
      <link rel="stylesheet" href="assets/css/admin.css">
      <script src="jquery.min.js"></script>
    <!--<![endif]-->
    <script src="assets/js/amazeui.min.js"></script>
    <script src="assets/js/app.js"></script>
    
    <style type="text/css">
        .search:hover{background-color: #C40A0D;}
        .search-input { padding: 5px; margin: 0; border: 1px solid #beceeb; }
            .clear { display: none; position: absolute; width: 16px; height: 16px; margin: 6px 0 0 -20px; background: url(aaa.png) no-repeat; outline: none; }
            .search-input::-ms-clear { display: none; }
            .search-input:valid + .clear { display: inline; }
      
    
    
    
    
    </style>
    
    
    </head>
    <body>
    
    
    <div class="am-dropdown" style=" 100%">
    <input type="search" class="search-input"  style=" 80%;">
        
        <a href="javascript:;" class="clear" onclick="cssClear();" ></a>
        <button class="search-btn">取消</button>
    </input>
    
      <ul class="search-content" style=" 80%;display: none;">
        
    <li class="search">fasd</li>
    
    <li class="search">fasd2</li>
    <li class="search">fasd3</li>
    <li class="search">fasd4</li>
        
      </ul>
       
    </div>
    
    
    <script type="text/javascript">
      $(".search-input").keyup(function () {
        if($(this).val()==""){
    $(".search-btn").html("取消");
    $(".search-content").hide();
    
        }else{
    $(".search-btn").html("搜索");
          $(".search-content").show();
        }
        
      });
    
    $(".search").click(function () {
      // body...
      $(".search-input").val($(this).html());
      $(".search-content").hide();
      $(".search-btn").html("搜索");
    
    })
    
    function cssClear() {
      $(".search-input").val("");
      $(".search-content").hide();
      $(".search-btn").html("取消");
        }
    
    </script>
    
    
    </body>
    </html>
  • 相关阅读:
    剑指offer(第2版)刷题 Python版汇总
    git学习笔记
    Python中的lambda、map和filter
    算法题 22 折纸问题 (牛客网,今日头条)
    算法题 21 findNSum (好未来,LeetCode,牛客网)
    算法题 20 或与加
    Python的内存管理机制
    【算法题12 解码方法decode way】
    理解循环神经网络的来龙去脉
    机器学习资源个人汇总
  • 原文地址:https://www.cnblogs.com/aliblogs/p/5810927.html
Copyright © 2011-2022 走看看