首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

鼠标点符号击文本框后,里面的文字就消失,鼠标离开文本框后,里面的文字又会显示

2012-10-08 
鼠标点击文本框后,里面的文字就消失,鼠标离开文本框后,里面的文字又会显示今天么事干浏览网页,看到这段代

鼠标点击文本框后,里面的文字就消失,鼠标离开文本框后,里面的文字又会显示
今天么事干浏览网页,看到这段代码,就粘贴过来了。

<!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=gbk" />     <title>鼠标点击文本框后,里面的文字就消失,鼠标离开文本框后,里面的文字又会显示</title>   </head>   <body>     <input name="key" type="text" id="key" value="关键词" size="30"            onmouseover=this.focus();this.select();           onclick="if(value==defaultValue){value='';this.style.color='#000'}"            onBlur="if(!value){value=defaultValue;this.style.color='#999'}" style="color:#999" />  </body> </html> 

热点排行