HTML input 文本框如何添加提示信息

HTML input 文本框如何添加提示信息

------------------------------------------------------------------------------------------------

 

只需要给Input添加一个  placeholder 属性并输入你要提示的信息就可以了

 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5     <title></title>
 6     <meta charset="utf-8" />
 7 </head>
 8 <body>
 9     <input type="text" name="name" value="" placeholder="请输入信息" />
10 </body>
11 </html>

 

posted @ 2018-01-06 10:44  随遇灬而安  阅读(1662)  评论(0编辑  收藏  举报