1.智能表单的介绍

  其中,(1)中的使用格式使得form不会太臃肿。

  

2.使用规范

  

3.新属性

  

4.举例

  

二.程序

1.关于邮件的问题

 <!DOCTYPE html>
<head>
<meta charset=utf-8>
<title>form test</title>
</head>
<body>
<form id="for" action="" method="get">
<!--email-->
邮件<input id="" type="email" name="email" placeholder="请输入正确mail地址"/><br/> 提交<input type="submit" value="提交"/>
</form>
</body>
</html>

2.结果

  

3.网址

 <!DOCTYPE html>
<head>
<meta charset=utf-8>
<title>form test</title>
</head>
<body>
<form id="for" action="" method="get">
<!--email-->
邮件<input id="e1" type="email" name="email" placeholder="请输入正确mail地址"/><br/> <!--url---->
网址<input id="u1" type="url" name="url"/> 提交<input type="submit" value="提交"/>
</form>
</body>
</html>

4.结果

  网址的开头需要http://

  

5.各种日期

 <!DOCTYPE html>
<head>
<meta charset=utf-8>
<title>form test</title>
</head>
<body>
<form id="for" action="" method="get">
<!--email-->
邮件<input id="e1" type="email" name="email" placeholder="请输入正确mail地址"/><br/> <!--url---->
网址<input id="u1" type="url" name="url"/><br/><br/> <!--time,date-->
日期<input id="d1" type="date" name="time"/><br/>
月份<input id="m1" type="month" name="month"/><br/>
星期<input id="w1" type="week" name="week"/><br/>
时间<input id="t1" type="time" name="time"/><br/><br/> 提交<input type="submit" value="提交"/>
</form>
</body>
</html>

6.结果

  

7.数字

 <!DOCTYPE html>
<head>
<meta charset=utf-8>
<title>form test</title>
</head>
<body>
<form id="for" action="" method="get">
<!--email-->
邮件<input id="e1" type="email" name="email" placeholder="请输入正确mail地址"/><br/> <!--url---->
网址<input id="u1" type="url" name="url"/><br/><br/> <!--time,date-->
日期<input id="d1" type="date" name="time"/><br/>
月份<input id="m1" type="month" name="month"/><br/>
星期<input id="w1" type="week" name="week"/><br/>
时间<input id="t1" type="time" name="time"/><br/><br/> <!--number-->
数字<input id="n1" type="number" name="number"/><br/> <!--range--> 提交<input type="submit" value="提交"/>
</form>
</body>
</html>

8.结果

  

9.滑动

 <!DOCTYPE html>
<head>
<meta charset=utf-8>
<title>form test</title>
</head>
<body>
<form id="for" action="" method="get">
<!--email-->
邮件<input id="e1" type="email" name="email" placeholder="请输入正确mail地址"/><br/> <!--url---->
网址<input id="u1" type="url" name="url"/><br/><br/> <!--time,date-->
日期<input id="d1" type="date" name="time"/><br/>
月份<input id="m1" type="month" name="month"/><br/>
星期<input id="w1" type="week" name="week"/><br/>
时间<input id="t1" type="time" name="time"/><br/><br/> <!--number-->
数字<input id="n1" type="number" name="number"/><br/> <!--range-->
滑动<input id="r1" type="range" min="0" max="3" step="1"/><br/> 提交<input type="submit" value="提交"/>
</form>
</body>
</html>

10.结果

  

11.搜索

 <!DOCTYPE html>
<head>
<meta charset=utf-8>
<title>form test</title>
</head>
<body>
<form id="for" action="" method="get">
<!--email-->
邮件<input id="e1" type="email" name="email" placeholder="请输入正确mail地址"/><br/> <!--url---->
网址<input id="u1" type="url" name="url"/><br/><br/> <!--time,date-->
日期<input id="d1" type="date" name="time"/><br/>
月份<input id="m1" type="month" name="month"/><br/>
星期<input id="w1" type="week" name="week"/><br/>
时间<input id="t1" type="time" name="time"/><br/><br/> <!--number-->
数字<input id="n1" type="number" name="number"/><br/> <!--range-->
滑动<input id="r1" type="range" min="0" max="3" step="1"/><br/><br/> <!--search-->
搜索<input id="s1" type="search" name="search" results="n" value="搜索"/><br/><br/>
提交<input type="submit" value="提交"/>
</form>
</body>
</html>

12.结果

  

13.list属性

 <!DOCTYPE html>
<head>
<meta charset=utf-8>
<title>form test</title>
</head>
<body>
<form id="for" action="" method="get">
<!--email-->
邮件<input id="e1" type="email" name="email" placeholder="请输入正确mail地址"/><br/> <!--url---->
网址<input id="u1" type="url" name="url"/><br/><br/> <!--time,date-->
日期<input id="d1" type="date" name="time"/><br/>
月份<input id="m1" type="month" name="month"/><br/>
星期<input id="w1" type="week" name="week"/><br/>
时间<input id="t1" type="time" name="time"/><br/><br/> <!--number-->
数字<input id="n1" type="number" name="number"/><br/> <!--range-->
滑动<input id="r1" type="range" min="0" max="3" step="1"/><br/><br/> <!--search-->
搜索<input id="s1" type="search" name="search" results="n" value="搜索"/><br/><br/> <!--text--list-->
list<input id="t2" type="text" list="ilist"/>
<datalist id="ilist">
<option label="o1" value="oo1">
<option label="o2" value="oo2">
<option label="o3" value="oo3">
</datalist>
<br/><br/><br/><br/><br/> 提交<input type="submit" value="提交"/>
</form>
</body>
</html>

14.结果

  

15.颜色与正则

 <!DOCTYPE html>
<head>
<meta charset=utf-8>
<title>form test</title>
</head>
<body>
<form id="for" action="" method="get">
<!--email-->
邮件<input id="e1" type="email" name="email" placeholder="请输入正确mail地址"/><br/> <!--url---->
网址<input id="u1" type="url" name="url"/><br/><br/> <!--time,date-->
日期<input id="d1" type="date" name="time"/><br/>
月份<input id="m1" type="month" name="month"/><br/>
星期<input id="w1" type="week" name="week"/><br/>
时间<input id="t1" type="time" name="time"/><br/><br/> <!--number-->
数字<input id="n1" type="number" name="number"/><br/> <!--range-->
滑动<input id="r1" type="range" min="0" max="3" step="1"/><br/><br/> <!--search-->
搜索<input id="s1" type="search" name="search" results="n" value="搜索"/><br/><br/> <!--text--list-->
list<input id="t2" type="text" list="ilist"/>
<datalist id="ilist">
<option label="o1" value="oo1">
<option label="o2" value="oo2">
<option label="o3" value="oo3">
</datalist> <!--color required pattern-->
颜色<INPUT type=color><br>
正则测试<input type="text" pattern="[789]+" required />
<br/><br/><br/><br/><br/> 提交<input type="submit" value="提交"/>
</form>
</body>
</html>

16.结果

  

  

form的智能表单的更多相关文章

  1. HTML5_智能表单

    1.HTML5中为了方便排版,可以使from中的表单标签脱离from的嵌套.方法:from指定ID,所有表单标签均添加from=id属性. <form action="http://l ...

  2. BootStrap 智能表单系列 首页 (持续更新中...)

    背景:本码农.NET后端工程师,在项目开发中发现写了很多重复的代码, 于是自己整了一套根据配置来生成form表单的插件,针对表单的改动仅需要修改配置的json即可 使用中发现还是蛮实用的,于是开源出来 ...

  3. BootStrap 智能表单系列 六 表单数据绑定(编辑页面的数据绑定)

    本章介绍如何在生成表单后,将一个model的数据展示到form表单中(一般用于编辑页面) 代码如下(连接地址:https://github.com/xiexingen/Bootstrap-SmartF ...

  4. BootStrap 智能表单系列 七 验证的支持

    但凡是涉及到用户编辑信息然后保存的页面,都涉及到一个数据是否符合要求的检查,需要客服端和服务器端的校验的问题: 客服端的校验主要是为了提高用户体验,而服务器端的校验为了数据的合格性 该插件也为您支持到 ...

  5. BootStrap 智能表单系列 四 表单布局介绍

    表单的布局分为自动布局和自定义布局两种: 自动布局就是根据配置项中第二级配置项中数组的长度来自动使用不同的bootstrap栅格,通过设置autoLayout为true可以实现自动布局 自动以布局就是 ...

  6. BootStrap 智能表单系列 三 分块表单配置的介绍

    相信广大博友肯定碰到过一个编辑页面分了很多块的情况,智能表单插件已经为您支持了这种情况, 代码如下(链接地址:https://github.com/xiexingen/Bootstrap-SmartF ...

  7. BootStrap 智能表单系列 二 BootStrap支持的类型简介

    代码如下(链接地址:https://github.com/xiexingen/Bootstrap-SmartForm/blob/master/demo/form1-basic.html): <! ...

  8. HTML5 智能表单

    HTML5 智能表单 1.表单新增属性  ☀ autofocus 属性 <input type="text" autofocus/>设置 autofocus 属性,使文 ...

  9. HTML5智能表单

    HTML5 智能表单 1.表单新增属性  ☀ autofocus 属性 <input type="text" autofocus/>设置 autofocus 属性,使文 ...

随机推荐

  1. 【转】Git 安装和使用教程

    git 提交 全部文件 git add .  git add xx命令可以将xx文件添加到暂存区,如果有很多改动可以通过 git add -A .来一次添加所有改变的文件.注意 -A 选项后面还有一个 ...

  2. luogu1525 [NOIp2011]关押罪犯 (并查集)

    先从大到小排序,看到哪个的时候安排不开了 给每个人拆成两个,如果x和y有矛盾,就给x和y‘.y和x’连边:如果a和b(或a'和b')在同一个集合里,说明他们一定要在同一个监狱里. #include&l ...

  3. LibreOJ #2325. 「清华集训 2017」小Y和恐怖的奴隶主(矩阵快速幂优化DP)

    哇这题剧毒,卡了好久常数才过T_T 设$f(i,s)$为到第$i$轮攻击,怪物状态为$s$时对boss的期望伤害,$sum$为状态$s$所表示的怪物个数,得到朴素的DP方程$f(i,s)=\sum \ ...

  4. 洛谷P2480 古代猪文

    这道题把我坑了好久...... 原因竟是CRT忘了取正数! 题意:求 指数太大了,首先用欧拉定理取模. 由于模数是质数所以不用加上phi(p) 然后发现phi(p)过大,不能lucas,但是它是个sq ...

  5. git other-误删恢复等

    修改未push的最后一次commit 如在commit后发现漏添加的文件或者commit message需要修改,则可以依次执行: git add FILE_UN_STAGED # 将未提交的文件添加 ...

  6. 【疑点】js中的break,continue和return到底怎么用?

    转: [疑点]js中的break,continue和return到底怎么用? 为什么要说个?好像很简单,但是我也会迷糊,不懂有时候为什么要用return,然而break和continue也经常和他放在 ...

  7. springboot整合mybatis中的mapper不影响使用,但是总是提示红线

    解决方案: 如图:

  8. Ajax跨域CORS

    在Ajax2.0中多了CORS允许我们跨域,但是其中有着几种的限制:Origin.Methods.Headers.Credentials 1.Origin 当浏览器用Ajax跨域请求的时候,会带上一个 ...

  9. bzoj千题计划210:bzoj2642 | Poj3968 | UVALive 4992| hdu 3761 Jungle Outpost

    http://www.lydsy.com/JudgeOnline/problem.php?id=2642 题意: n个瞭望台,形成一个凸n边形.这些瞭望台的保护范围是这个凸包内的任意点. 敌人进攻时, ...

  10. [整理]x=x++和x=++x

    最近看java面试题,再次遇到x=x++,之前一直按照C语言中对自增运算符++的解释去理解.殊不知自己犯了严重的错误. (1)不同的语言的编译器,会导致相同的代码最终执行的结果不确定; (2)而且就算 ...