The range that should contain a value from a
range of numbers for input fields.
This input type is displayed as a slider bar.
You can set number which are accepted:
<html>
<body>
<form action="demo_form.asp" method="get">
Points: <input type="range" name="points" min="1" max="10" />
<input type="submit" />
</form>
</body>
</html>
The following attributes specify the range type:
You can set number which are accepted:
Syntax:
<input type="range" name="points" min="1" max="15"
/>
Example:
<!DOCTYPE html><html>
<body>
<form action="demo_form.asp" method="get">
Points: <input type="range" name="points" min="1" max="10" />
<input type="submit" />
</form>
</body>
</html>
The following attributes specify the range type:
Attribute | Value | Description |
---|---|---|
max | number | Specifies the maximum value allowed |
min | number | Specifies the minimum value allowed |
step | number | Specifies legal number intervals (if step="3", legal numbers could be -3,0,3,6, etc) |
value | number | Specifies the default value |
No comments:
Post a Comment