I have an HTML form as follow:
As others have noted, there is an attribute in HTML5 that allows this called placeholder
- read about it here:
http://diveintohtml5.info/forms.html
http://dev.w3.org/html5/spec/Overview.html#the-placeholder-attribute
This does not require Javascript, but it is not supported by older browsers (see http://caniuse.com/#feat=input-placeholder).
It should be noted that placeholder is not meant to replace s, which you are not using and probably should be.
Labels are important for a variety of reasons and it is bad practice to not use them.