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

HTML5入门----表单元素(2)

2016-06-03 19:57 441 查看
表单元素

   - color

   - datetime

   - datetime-local

   - time

   - date

   - week

   - month

以上元素相关代码

<span style="font-size:18px;"><span style="font-size:18px;"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>表单</title>
</head>

<body>
<form>
<input type="color"/>
<input type="datetime"/>
<input type="datetime-local"/>
<input type="time"/>
<input type="date"/>
<input type="week"/>
<input type="month"/>
<input type="text" placeholder="请输入姓名:" spellcheck="true" list="test" aotufocus />     <!--placeholder属性--></span></span>
<span style="font-size:18px;"><span style="font-size:18px;">  <!-autofocus自动焦点属性-->
</form>
<datalist id="test">    <!--数据列表,让文本框具有下拉选择的功能--><!--和list关联-->
<option value="a"></option>
<option value="b"></option>
<option value="c"></option>
</datalist>
</body></span>
</html></span>


效果显示



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  html5