Is it possible to change the input type of BS4 Input at runtime?
I’d like to change from text to number, and vice versa.
Thanks
Is it possible to change the input type of BS4 Input at runtime?
I’d like to change from text to number, and vice versa.
Thanks
Yes. You can simply change the type attribute value
if (number) {
Input1_contents.setAttribute('type', 'number');
} else {
Input1_contents.setAttribute('type', 'text');
}
Works, thanks