Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>clear</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
window.onload=function() {
var searchSite = document.getElementById('searchSite');
searchSite.onfocus = function() {if(this.value==this.defaultValue){this.value='';this.style.color='#000';}};
searchSite.onblur = function() {if(this.value==''){this.value=this.defaultValue;this.style.color='#888';}};
};
</script>
<style type="text/css">
* {margin:0;padding:0;}
#searchSite {color:#888;}
</style>
</head>
<body>
<form action="#" name="form1">
<div>
<label>
<input id="searchSite" name="searchSite" type="text" value="Search my site">
</label>
</div>
</form>
</body>
</html>
Bookmarks