Answer the question
In order to leave comments, you need to log in
How to add text to input?
How can I add m2 to the input?
Answer the question
In order to leave comments, you need to log in
document.querySelector('input').addEventListener('input', function(){
let value = this.value;
if(!value) return;
value = value.replace(/ м²/g, '');
this.value = value + ' м²';
}, false);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question