Source Code:
Result:
First name:
Last name:
Click an input field to get focus. Click outside an input field to lose focus.
Edit the code above and click "Submit Code" to see the result.
W3Schools.com
- Try it yourself