to take input type as number in html code example Example: html5 number integer <input type="number" step="1" />