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>