bubuchu

最简便的一个方法,通过js实现。

<input type="text" name="username" id="username" value="姓名" onfocus="if(this.value==\'姓名\') this.value = \'\'" onblur="if(this.value==\'\') this.value=\'姓名\'">
<textarea name="content" id="content" onfocus="if(this.value==\'内容\') this.value = \'\'" onblur="if(this.value==\'\') this.value=\'内容\'">内容</textarea>
    

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2021-06-24
  • 2021-11-18
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-01
  • 2021-10-04
  • 2021-12-14
  • 2021-09-02
  • 2021-12-03
相关资源
相似解决方案