html - 如何用搜索按钮替换 'Enter key' 搜索

标签 html css wordpress

我的网站上有一个可搜索的职位列表数据库,但它没有搜索按钮,它只是响应 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>  

最佳答案

你需要添加一个

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

在表格中

关于html - 如何用搜索按钮替换 'Enter key' 搜索,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55608242/

相关文章:

php - 以 HTML 表单提交 Canvas 数据

jQuery 工具可滚动根元素相对定位而不是绝对定位

javascript - 如何替换(复制粘贴)文本框中的非字母字符

iphone - 在 iPhone 上无法选择的超链接和按钮 - 适用于所有其他浏览器

html - 垂直对齐 flex-box 和 flex-direction : column

jquery - 循环内的 WordPress 循环无法正常工作

php - WordPress 表创建抛出错误(而不是创建表)

php - 根据 WooCommerce 中的特定购物车总额添加费用

javascript - .prop 不更新复选框的视觉样式

javascript - 为多个实例使用复选框