鼠标点击文字消失,鼠标离开文字显示代码
<form id="form1" name="form1" method="post" action="">
<input type="text" name="textfield" onblur="if (this.value==''){this.value='输入关键字';}" onfocus="if (this.value=='输入关键字'){this.value='';}" value="输入关键字" />
</form>
<form id="form1" name="form1" method="post" action="">
<input type="text" name="textfield" onblur="if (this.value==''){this.value='输入关键字';}" onfocus="if (this.value=='输入关键字'){this.value='';}" value="输入关键字" />
</form>