给文本框添加灰色提示文字
1 html> 2 <head> 3 <title>中国站长天空-网页特效-表单特效-给文本框添加灰色提示文字</title> 4 <meta http-equiv="content-Type" content="text/html;charset=gb2312"> 5 </head> 6 <body> 7 <!--把下面代码加到<body>与</body>之间--> 8 <input type="text" id="key" name="key" value=" 请输入关键词" onFocus="if(value==defaultValue){value='';this.style.color='#000'}" onBlur="if(!value){value=defaultValue;this.style.color='#999'}" style="color:#999999"> 9 </body> 10 </html>