HTML5新增的input元素的type

url类型

<form action="">
        <input type="url" type="url" value="http://home.sise.cn"/>
        <input type="submit" value="提交"/>
</form>

email类型

<form action="">
        <input type="email" type="email" value="799242253@qq.com"/>
        <input type="submit" value="提交"/>
</form>

date类型

<input type="date" name="date" value=""/>

time类型

 <input type="time" type="time" value="10:00"/>

datetime类型

 <input type="datetime" type="datetime" value=""/>

datetime-local类型

<input type="datetime-local" name="datetime-local"/>

month元素

<input type="month" name="month" value=""/>

week元素

<input type="week" name="week" value=""/>

number类型

<input type="number" name="number" value="15" min="10" max="100" step="5"/>

range元素

<input type="range" name="range" value="25" min="0" max="100" step="5"/>

search类型

<input type="search" name="search"/>

tel类型

<input type="tel"/>

color类型

 <input type="color" onchange="document.body.style.backgroundColor                  =document.getElementById('currentColor').textContent
= this.value;"/>
<span id="currentColor"></span>

output元素追加

 <form id="testform">
        <input type="range" id="range" min="0" max="100"    step="5" value="10" onchange="value_change()"/>
        <output id="output">10</output>
    </form>

  <script>
        function sum() {
        function value_change() {
            var number = document.getElementById('range').value;
            document.getElementById("output").value = number;
        }
 </script>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值