只需要在input标签里使用placeholder属性即可。
即:
<input type="text" name="username" placeholder="用户名"/>
<input type="password" name="password" placeholder="密码"/>
效果:
只需要在input标签里使用placeholder属性即可。
即:
<input type="text" name="username" placeholder="用户名"/>
<input type="password" name="password" placeholder="密码"/>
效果: