Search the Community
Showing results for tags 'onblur onfocus form'.
Hey everyone, I'm trying to create a simple form where a user enters their name. I have the text field with an onfocus function that creates a div next to the field telling the user to enter their name. Now, with the onblur function, if the user enters nothing, using innerHTML the div will tell them again to enter their name. If they enter any text, the innerHTML in the div will change and say thank you. Here's my code so far, I feel like I have done it right, but it doesn't seem to work the way I want it to. Any help to point me in the right direction is greatly appreciated window.onload =