How to put default value to input and when user press enter it will disappear?
My code that is not working:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body>
<input value="default-value" type="text"/>
</body>
</html>
Here is an example of a search box with the initial value ‘enter search string here’. A bit of javascript clears out the box when the control gets the focus and begins typing: