Is it possible to focus on a
using JavaScript focus() function?

前端 未结 8 1475
说谎
说谎 2020-11-22 14:21

Is it possible to focus on a

using JavaScript focus() function?

I have a

tag

8条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 14:27

    document.getElementById('tries').scrollIntoView() works. This works better than window.location.hash when you have fixed positioning.

提交回复
热议问题