Home >Web Front-end >JS Tutorial >ASP.NET jQuery Example 1 (Create a default prompt in TextBox)_jquery
When the text box gets focus, if the content of the text box is the same as the prompt content, the prompt content will disappear naturally.
When the text box has no value and loses focus, the text box content will regenerate the default prompt.
In order to achieve the above requirements, the code is as follows:
Display effect: