<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>output 元素</title>
</head>
<body>
<form>
请选择您的年龄:
18
<input type="range" name="YourAge" min="18" max="40" step="1">
<output onFromInput="value=YourAge.value">40</output>
岁
</form>
<h2>2017-3-7</h2>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>output 元素</title>
</head>
<body>
<form>
请选择您的年龄:
18
<input type="range" name="YourAge" min="18" max="40" step="1">
<output onFromInput="value=YourAge.value">40</output>
岁
</form>
<h2>2017-3-7</h2>
</body>
</html>