<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Document</title>
<script type="text/javascript">
window.onload = function()
{
var one = document.getElementById("ones");
one.onchange = function()
{
var s = one.value;
console.log(s);
}
}
</script>
</head>
<body>
<form action="" method="post" id="form">
邮箱:<input type='email' id="" value="" /> <br />
url:<input type="url" name="" id="" value="" /> <br />
number: <input type="number" min="1" max="10" name="" id="" value="" /> <br />
<!--滑块-->
<input type="range" name="" min="1" max="100" step="1" value="1" id="ones"/>
<br />
<!--日期时间-->
<input type="datetime-local" name="" id="" value="" />
<br />
<!--颜色-->
<input type="color" name="" id="" value="" />
<br />
<!--自动匹配-->
<input type="text" name="" id="" value="" list="list"/>
<datalist id="list">
<option value="北京">北京</option>
<option value="南京">南京</option>
<option value="西京">西京</option>
</datalist>
<br />
<!--自动获取焦点-->
<input type="text" autofocus="on" name="" id="" value="" />
<input type="submit" value="提交"/>
</form>
<!--提交form表单之外的表单-->
<input type="password" name="pass" id="pass" value="" form="form"/>
</body>
</html>
html5-表单
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.