Restriction of input type
Hello everyone! Please, could you provide a solution to the restriction of input? For example, "only digits" would make no effect on the input box if key pressed other than digit or vice versa with text (characters). Thanks in advance!
Kekit Kind of, but not entirely true. There's also 'email', 'tel' and 'url' for e-mail phone number and URL, respectively. But value of input 'type' attribute only helps by means of displaying relevant optional button on the keyboard, depending on attribute value. For example the @ button is shown for 'email' or 'www' button shown for 'url' input. Yet again, it does not enforce restriction, thus obviously, validation is still in order. https://www.w3schools.com/html/html_form_input_types.asp
Not exactly sure what you wanted, but as I understand it <input type="number" /> allows digits and formatting characters e.g. decimal point, no alphabet nor others. I'd suggest you to add more info on what it is you actually are looking into.
Ipang I suppose that this is answer to me)) 'type=' attribute of input restricts user from using other than 'type'. Correct?
Error in Program
BMI calculator code project