Here is a example code which uses jquery.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script language="javascript">
$(document).ready(function() {
$("#keyword").val('Enter Your Search Here');
$("#keyword").bind("focus", function(){
if($(this).val() == 'Enter Your Search Here')
$(this).val('');
});
$("#keyword").bind("blur", function(){
if($(this).val() == '')
$(this).val('Enter Your Search Here');
});
});
</script>
</head>
<body>
<input autocomplete="off" id="keyword" name="" style="width:250px;" type="text" />
</body>
</html>
Hope it will help you.