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

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -