“máscara de número de telefone jQuery” Respostas de código

máscara de número de telefone jQuery

<script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/5.0.5/jquery.inputmask.min.js"></script>
<script>
  $(function () {
    $('#contact_phone').inputmask({"mask": "(999) 999-9999"})
  });
</script>
Almabek

máscara de entrada de telefone jQuery

	// jQuery-плагин для установки курсора в определенной позиции pos:
	$.fn.setCursorPosition = function (pos) {
		if ($(this).get(0).setSelectionRange) {
			$(this).get(0).setSelectionRange(pos, pos);
		} else if ($(this).get(0).createTextRange) {
			var range = $(this).get(0).createTextRange();
			range.collapse(true);
			range.moveEnd('character', pos);
			range.moveStart('character', pos);
			range.select();
		}
	};

	$('[name="phone"]').click(function () {
		$(this).setCursorPosition(3);
	}).mask('+7 (999) 999-99-99');
artharus

Respostas semelhantes a “máscara de número de telefone jQuery”

Perguntas semelhantes a “máscara de número de telefone jQuery”

Mais respostas relacionadas para “máscara de número de telefone jQuery” em JavaScript

Procure respostas de código populares por idioma

Procurar outros idiomas de código