A2Zmenu.Com
Blog
Tutorials
Online Exam
Ask Question
Utility
Fun @ Work
Wiki
Contact Us
About Us
Loading
Home
Blogs
AJAX
ASP.NET
BI
CSharp
JavaScript
LINQ
Miscellaneous
MVC
SQL
SharePoint
Silverlight
WCF
Tutorials
HTML5
ASP.NET 4.0
CSharp
SharePoint
SQL Function
Online Exam
ASP.NET
LINQ
Silverlight
SQL
JavaScript
SharePoint
Forum
Utility
Fun @ Work
Appraisal
Funny Images
Funny Puzzle
Miscellaneous
Motivating Stories
Life Vs Work
Wiki
Contact Us
HTML5
ASP.NET 4.0
CSharp
SharePoint
SQL Function
Test Your Skill
Q. Which of the following input type was not introduced with HTML5.
URL
Search
multiple
Email
View all questions...
HTML5 Input Type Number
Number is new input type introduced with HTML5. This type can be used when you want to allow the user to add only numeric value is the input field. There are number of addition option attributes that will allow to add extra restriction on the user input.
List of attributes that help add extra level of filtrationon the user input
Attributes(value=[number])
Description
Min
Minimum accepted value for the input field
Max
Maximum value for the input field
Step
Legal interval value i.e. if step = 2 possible value for the are all number in range of max and min with value%2 = 0
Value
This is default value associated with input field.
Placeholder(value=[text])
Hint text associated with input field
<
html
>
<
head
>
</
head
>
<
body
>
<div>
</div>
<input
type
="number"
value
="4"
min
="0"
max
="20"
step
="2"
/>
<input
type
="submit"
/>
</
body
>
</
html
>
Try it yourself
The default value of the input field is the number supplied in the value attribute, Will allow only numeric value. Field has slider associated with it which is used to increase or decrease the value. Value will increase or decrease by the amount equal to stepvalue.
Note: Browser not supporting type=number will render it asnormal text input field. So you can start using the same in place where yourequired to have field that allow only numeric value.
<< Previous
Next >>
Add Comment
Comment
Name
(Required)
E-mail
(Privacy assured)
(Required)
Subscribe to this site by email
Poll of the Day
Q.
Best Smart Mobile Phone in market?
I-Phone
Samsung
Nokia
Others
Related Contents
Online Test Papers
ASP.NET
JavaScript
LINQ
SharePoint
Silverlight
SQL
Related Tutorials
HTML 5 Tutorial
SharePoint Best Practice
How to add ribbon button in SharePoint list and library
List Join operation in SharePoint 2007 / 2010
ASP.NET 4.0 Tutorials
Fun @ Work
Keep smiling always
Developer Vs Tester
There are solutions, even to the hardest problems
Corporate Cartoons
Golden words of steve jobs
Top Blogs
SharePoint 2010 Modal Dialog
How to call webservice using Ajax or JavaScript
Microsoft OLE DB Provider for ODBC Drivers error 80004005
Using SQL SWITCH CASE Statement
Validation of viewstate MAC failed. If this application is hosted...
Creating a Windows Service in C#
Using InstallUtil to install/uninstall service
Each GROUP BY expression must contain at least one column that is not an outer reference
How to add ribbon button in SharePoint list and library
Client side onselectedindexchanged or onchange event in RadioButtonList
Arithmetic overflow error
Pass Data from Parent window to ChildWindow
Silverlight: ListBox with CheckBox
Tablix headers not repeating in SSRS 2008
LINQ to SQL Best Practice
Calling JavaScript function from C#
The contract name could not be found in the list of contracts implemented by the service
Like To Connect With US
x