Altjen B. Altjen B. - 1 year ago 75
Javascript Question

how can I use focus function and calling a javascript function in

I call a function when press the textbox. this is the code for that


but only when click on the textbox. but if I move with TAB it wont call GetColorBack function.

how can I do that?

PS: not the CSS focus type

Answer Source

For "vanilla"-javascript use onclick="GetColorBack()" onfocus="GetColorBack()"

I think onfocus="GetColorBack()" will be enough, cause clicking lead to focus-event

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download