No you can not, but input type number
provides exactly the functionality you need for this purpose.
Example:
<input type="number" min="1900" max="2099" step="1" value="2016" />
More Related Contents:
- Form inside a table
- What is the default form HTTP method?
- using href links inside tag
- How do you overcome the HTML form nesting limitation?
- How do I change the color of radio buttons?
- How to get HTML 5 input type=”date” working in Firefox and/or IE 10
- How to call servlet class from HTML form
- Setting the character encoding in form submit for Internet Explorer
- Make page to tell browser not to cache/preserve input values
- How to set default value to the input[type=”date”] [duplicate]
- Tri-state Check box in HTML?
- Can you have multiline HTML5 placeholder text in a ?
- Form inside a form, is that alright? [duplicate]
- How can I submit a POST form using the tag?
- HTML5 validation when the input type is not “submit”
- Use Fieldset Legend with bootstrap
- How to align input forms in HTML
- Which elements support the ::before and ::after pseudo-elements?
- HTML form with multiple “actions”
- or ? What’s the difference?
- How to align texts inside of an input?
- Why is the first element always blank in my Rails multi-select, using an embedded array?
- Multiple submit buttons on HTML form – designate one button as default [duplicate]
- What happens if the action field in a has parameters?
- Using rvest or httr to log in to non-standard forms on a webpage
- Why use definition lists (DL,DD,DT) tags for HTML forms instead of tables?
- How to remove x and y on submit in HTML form with Image type button?
- Custom HTTP Request headers in HTML
- Is it bad design to use table tags when displaying forms in html?
- How can I pre-populate html form input fields from url parameters?