Home >Web Front-end >JS Tutorial >js operates input box prompt information and responds to mouse events_javascript skills
We often encounter some input boxes. For example, the input box for a registration website has a default prompt value. When the mouse focus is obtained, the default value is deleted. When the user leaves the focus without inputting anything, the default prompt value is restored. This method is implemented with js code as follows:
html code: