Source Code:
First name:
Last name:
Click an input field to get focus. Click outside an input field to lose focus.
Result:
W3Schools.com
- Try it yourself