When HTML5 will be supported by many browsers, it is very easy:
<input type="text" placeholder="default-value" />
Until than I would use a background image and let it disappear it a user focuses the input, as otherwise a user might submit the default value and you have to filter it out server side:
<input type="text" name="fieldname" id="fieldname" style="background-image: url("default-value.png"); background-repeat: no-repeat;" />
And the JavaScript to remove it on click (uses prototype framework):
$('fieldname').observe('click', function() {
// if already cleared, do nothing
if(this._cleared) return;
this.setStyle({backgroundImage: ''});
this._cleared = true
});