0

How can I add more IDs ?

(function() { var input = document.getElementById('phone'); var pattern = /^[6-9][0-9]{0,9}$/; var value = input.value; !pattern.test(value) && (input.value = value = ''); input.addEventListener('input', function() { var currentValue = this.value; if(currentValue && !pattern.test(currentValue)) this.value = value; else value = currentValue; }); })();

5th Apr 2020, 1:48 PM
arun
2 Respuestas
0
thank solved
6th Apr 2020, 7:47 AM
arun