我在我的网站上有一个html和jquery的searchBox,问题是当我按下ENTER时我的网站上的任何地方我被发送到searchBox搜索结果页面,无论我是否正在键入/选择它
HTML SearchBox代码:
class PersonsModel extends Model {
//connect to the next database
protected $connection = 'inspection';
protected $table = 'tbl_trucks';
//relation with tbl_checks
public function checks(){
return $this->hasMany('App\TblChecks','person_id','id');
}
}
jQuery代码:
<li>
<div class="formBusca">
<form role="search" method="post" class="search-form" action="">
<div class="input-busca">
<input type="search" class="search-field" id="palavra-chave" placeholder="Busca..." name="palavra-chave" title="Pesquisar">
</div>
<div class="botao-busca">
<input type="button" class="search-submit" id="busca-site" value="">
</div>
</form>
</div>
</li>