JS-- 输入框聚焦,点击时清空文本框

 

http://163navy.blog.163.com/blog/static/105304086200961535837896/

 

 

<title>输入框聚焦,点击时清空文本框</title>
<input size="30" maxlength="100" value="/"  onMouseOver="this.focus()" onMouseOut="if(this.value=='')this.value='/';" onFocus="this.select()" onClick="if(this.value=='/')this.value=''">

你可能感兴趣的:(Blog)