您的位置:首页 > Web前端 > HTML

HTML 5 <input> placeholder 属性

2016-05-31 14:44 627 查看


HTML 5 <input> placeholder 属性


语法

<input placeholder="text">


属性值

描述
text规定用于验证输入字段的模式。


实例

带有 placeholder 文本的搜索字段:
<!DOCTYPE HTML>
<html>
<body>

<form action="/example/html5/demo_form.asp" method="get">
<input type="search" name="user_search" placeholder="Search W3School" />
<input type="submit" />
</form>

</body>
</html>


查看结果:



本文转自:“http://www.w3school.com.cn/tags/att_input_placeholder.asp
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: