I have a search input text which I'd like to apply a focus()
when loading the page, the problem is that the focus
function automatically does a scroll to this field. Any solution to disable this scroll?
<input id="search_terms" type="text" />
<script>
document.getelementbyId('search-terms').focus();
</script>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…