javascript - How to determine if a field has focus? -


very similar how find out dom element has focus? except i'm not trying find field has focus, need know if particular 1 has focus. possible?

you can try

$("input#id").is(":focus") 

edit: should read post if plan use on older browsers. http://forum.jquery.com/topic/is-the-focus-selector-valid


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -