Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery phone number mask

<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>
Comment

jquery telephone input mask

	// 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');
Comment

PREVIOUS NEXT
Code Example
Javascript :: only numeric values are allow in input jquery 
Javascript :: check ip json 
Javascript :: Error: Cannot find module ‘node:events’ 
Javascript :: js loop through array backwards 
Javascript :: jquery add checked attribute 
Javascript :: body-parser deprecated undefined extended provide extended option 
Javascript :: select2 placeholder 
Javascript :: jQuery and changing the input field type 
Javascript :: object json jquery foreach 
Javascript :: length of object in javascript 
Javascript :: drupal 8 get page node 
Javascript :: dinosaur game hack 
Javascript :: How do I get the number of days between two dates in JavaScript 
Javascript :: sequelize order by date 
Javascript :: javascript int to float 
Javascript :: onclick for dynamically created element jquery 
Javascript :: jquery click function 
Javascript :: disable eslint for line 
Javascript :: node log without newline 
Javascript :: javascript replace space by underscore 
Javascript :: js check for url parameter 
Javascript :: addclass js vanilla 
Javascript :: javascript get table row count 
Javascript :: c3 json from string 
Javascript :: foreach document.getelementsbyclassname 
Javascript :: javascript get attribute 
Javascript :: react empty space 
Javascript :: adding a button in javascript 
Javascript :: DeprecationWarning: Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the `useFindAndModify` option set to false are deprecated. See: https://mongoosejs.com/docs/deprecations.html#findandmodify 
Javascript :: regex match letters and special characters 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =