Using jQuery to test if an input has focus

后端 未结 15 1547
梦谈多话
梦谈多话 2020-11-22 05:42

On the front page of a site I am building, several

s use the CSS :hover pseudo-class to add a border when the mouse is over them. One of
15条回答
  •  傲寒
    傲寒 (楼主)
    2020-11-22 06:27

    There is no :focus, but there is :selected http://docs.jquery.com/Selectors/selected

    but if you want to change how things look based on what is selected you should probably be working with the blur events.

    http://docs.jquery.com/Events/blur

提交回复
热议问题