tags:

views:

21

answers:

0

Hello, Is there a way to know whether the current input box is focused using javascript (not using onfocus event, more of an if statement to loop through a list of input boxes and know which input box is in focus) ?

Basically i have a column input boxes and want to highlight the backgroud color of the current input box being edited. My input boxes are named as inputBox1,inputBox2,...and so on. But i always get the name of the last input box. So I want to know how can is highlight the input box which i am currently editing.