HTML
CSS
JavaScript
HTML
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>文档列表 - 光年(Light Year Admin)后台管理系统模板</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<meta name="keywords" content="LightYear,光年,后台模板,后台管理系统,光年HTML模板">
<meta name="description" content="LightYear是一个基于Bootstrap v3.3.7的后台管理系统的HTML模板。">
<meta name="author" content="yinqi">
<link href="http://lyear.itshubao.com/css/bootstrap.min.css" rel="stylesheet">
<link href="http://lyear.itshubao.com/css/style.min.css" rel="stylesheet">
</head>
  
<body>
<div class="container-fluid">
  
  <div class="row">
    <!--多条件搜索-->
	<div class="col-lg-12">
      <div class="card">
        <div class="card-header"><h4>搜索条件</h4></div>
        <div class="card-body">
          <form class="form-horizontal">
            <div class="form-group">
              <label for="inputEmail3" class="col-md-2 control-label">范围</label>
              <div class="col-md-10">
                <div class="input-group" data-date-format="yyyy-mm-dd">
                  <input class="form-control" type="text" name="start_time" value="" placeholder="开始时间">
                  <span class="input-group-addon no-border-lr">~</span>
                  <input class="form-control" type="text" name="end_time" value="" placeholder="结束时间">
                </div>
              </div>
            </div>
            <div class="form-group">
              <label for="inputPassword3" class="col-md-2 control-label">单选框</label>
              <div class="col-md-10">
                <label class="lyear-radio radio-inline radio-primary">
                  <input type="radio" name="e"><span>羽毛球</span>
                </label>
                <label class="lyear-radio radio-inline radio-primary">
                  <input type="radio" name="e"><span>冰球</span>
                </label>
                <label class="lyear-radio radio-inline radio-primary">
                  <input type="radio" name="e"><span>网球</span>
                </label>
              </div>
            </div>
            <div class="form-group">
              <label for="inputPassword3" class="col-md-2 control-label">复选框</label>
              <div class="col-md-10">
                <label class="lyear-checkbox checkbox-inline checkbox-primary">
                  <input type="checkbox"><span>篮球</span>
                </label>
                <label class="lyear-checkbox checkbox-inline checkbox-primary">
                  <input type="checkbox"><span>足球</span>
                </label>
                <label class="lyear-checkbox checkbox-inline checkbox-primary">
                  <input type="checkbox"><span>排球</span>
                </label>
              </div>
            </div>
            <div class="form-group">
              <label for="inputPassword3" class="col-md-2 control-label">下拉列表</label>
              <div class="col-md-10 row">
                <div class="col-sm-3">
                  <select name="type" class="form-control">
                    <option value="1">小说</option>
                    <option value="2">古籍</option>
                    <option value="3">专辑</option>
                    <option value="4">自传</option>
                  </select>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label for="inputPassword3" class="col-md-2 control-label">联动下拉</label>
              <div class="col-md-10 row">
                <div class="col-sm-3 m-b-5">
                  <select name="one" class="form-control">
                    <option value="0">请选择省份</option>
                    <option value="1">北京</option>
                    <option value="2">上海</option>
                    <option value="3">天津</option>
                  </select>
                </div>
                <div class="col-sm-3 m-b-5">
                  <select name="two" class="form-control">
                    <option value="0">选择市</option>
                  </select>
                </div>
                <div class="col-sm-3 m-b-5">
                  <select name="three" class="form-control">
                    <option value="0">选择区县</option>
                  </select>
                </div>
              </div>
            </div>
            <div class="form-group">
              <div class="col-md-offset-2 col-md-10">
                <button type="submit" class="btn btn-default">确认选择</button>
              </div>
            </div>
          </form>
        </div>
      </div>
	</div>
    
	<!--单行条件搜索-->
	<div class="col-lg-12">
	  <div class="card">
	    <div class="card-body">
          <form class="form-inline">
		    <div class="form-group m-b-5">
			  <div class="input-group">
                <div class="input-group-btn search-bar">
                  <input type="hidden" name="search_field" id="search-field" value="title">
                  <button class="btn btn-default dropdown-toggle" id="search-btn" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
                  标题 <span class="caret"></span>
                  </button>
                  <ul class="dropdown-menu">
                    <li> <a tabindex="-1" href="javascript:void(0)" data-field="title">标题</a> </li>
                    <li> <a tabindex="-1" href="javascript:void(0)" data-field="author">作者</a> </li>
                  </ul>
                </div>
                <input type="text" class="form-control" value="" name="keyword" placeholder="请输入关键词">
              </div>
			</div>
			<div class="form-group m-b-5 m-l-5">
			  <label for="range">时间</label>
              <div class="input-group">
                <input class="form-control" type="text" name="start_time" value="" placeholder="开始时间">
                <span class="input-group-addon no-border-lr">~</span>
                <input class="form-control" type="text" name="end_time" value="" placeholder="结束时间">
              </div>
			</div>
			<div class="form-group m-b-5 m-l-5">
			  <label for="range">分类</label>
              <select name="type" class="form-control">
                <option value="1">小说</option>
                <option value="2">古籍</option>
                <option value="3">专辑</option>
                <option value="4">自传</option>
              </select>
			</div>
			<div class="form-group m-b-5">
              <button type="submit" class="btn btn-default">查询</button>
			</div>
          </form>
		</div>
	  </div>
	</div>
	
  </div>
  
</div>
<script type="text/javascript" src="http://lyear.itshubao.com/iframe/js/jquery.min.js"></script>
<script type="text/javascript" src="http://lyear.itshubao.com/iframe/js/bootstrap.min.js"></script>
</body>
</html>
CSS

  
JavaScript
;
$(function(){
    // 下拉选择
    $('.search-bar .dropdown-menu a').click(function() {
        var field = $(this).data('field') || '';
        $('#search-field').val(field);
        $('#search-btn').html($(this).text() + ' <span class="caret"></span>');
    });
});