前端js模糊搜索(模糊查询)

时间:2022-01-05 13:27:07

1.html结构:

  <label for="searchShop" class="clear pos-a" style="top:17px;">
            <input type="text" id="searchShop" placeholder="场所搜索">
            <input type="button" value="搜索" class="searchIcon searchShopBtn">
  </label>

/*查询结果放ul里面*/

<ul id="searchResult" class="searchResult">

 

</ul>

 

2.css样式:

#searchShop {

  1. line-height: 28px;
  2. text-indent: 5px;
  3. width: 180px;
  4. float:left
  5. height: 28px;
  6. border: none;