很简单的 onblur onfocus步骤示例

很简单的 onblur onfocus方法示例html head meta http-equivContent-Type contenttext/html ch

很简单的 onblur onfocus方法示例
<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
 </head>
 <body>

  <input type='text' id='txt_q' name='q' class='SERACH' value='hello world' 

  onblur="(this.value=='')?this.value='hello world':this.value" 

  onfocus="if(this.value=='hello world'){this.value='';};this.select();"/>
  <br/>
 </body>
</html>
1楼xielinze4天前 16:29
犀利啊