如何使用搜索按钮替换“Enter键”搜索

问题描述 投票:2回答:1

我在我的网站上有一个可搜索的工作列表数据库,但它没有搜索按钮,它只是响应Enter键来触发搜索。

因此,填写“关键字”框和“位置”框,但您需要按Enter键而不是按下按钮。

有没有办法改变这个?

HTML:

<div class="search_jobs">
  <div class="search_keywords">
    <label for="search_keywords">Keywords</label>
    <input type="text" name="search_keywords" id="search_keywords" placeholder="Keywords" value="" />
  </div>
  <div class="search_location">
    <label for="search_location">Location</label>
    <input type="text" name="search_location" id="search_location" placeholder="Location" value="" />
  </div>
</div>  
html css wordpress
1个回答
1
投票

你需要添加一个

<input type="submit" value="submit">

在形式

© www.soinside.com 2019 - 2024. All rights reserved.