For the sake of learning, I am making a login-registration system in HTML, CSS, and PHP. There would be different HTML text boxes and stuff.
What I want to achieve is when I write something in one text box, then take out my cursor and click on another textbox, I want to change the border color of the first text box to green.
I know how to change the border color through CSS but I want to do this only when such an event happens. Any help would be greatly appreciated.