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