如何让它与纯 js 一起使用?(Como faria isto com js puro?)
<form id="formBuscaAncoraHash" class="search-form">
<div class="form-group">
<span class="icon fa fa-search"></span>
<input id="buscaRaca" class="form-control form-control-lg" type="submit" value="Digite um nome" />
</div>
</form>
var anchor = $("#buscaRaca").val();
var position = $("#"+anchor).offset();
window.scrollTo(position.left, position.top);