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 :: remove double quotes from json array javascript 
Javascript :: reverse int js 
Javascript :: typed.js 
Javascript :: javascript for...of loop to iterate over the multidimensional array 
Javascript :: download a file nodejs 
Javascript :: how to make one line if in js 
Javascript :: js get substring before character 
Javascript :: ajax with progress bar 
Javascript :: Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false` 
Javascript :: check local storage javascript 
Javascript :: react best libraries for Modern UI 
Javascript :: javascript mousedown mouseup 
Javascript :: check to see if work is uppercase javascript 
Javascript :: syntax for srcset in react 
Javascript :: react native get uri of the image in the app assets folder 
Javascript :: jquery force page to reload on viewport resize 
Javascript :: [PrivateRoute] is not a <Route component. All component children of <Routes must be a <Route or <React.Fragment 
Javascript :: Cookies In NodeJS 
Javascript :: slide out navigation 
Javascript :: loop through javascript object 
Javascript :: when i click on one checkbox check all checkboxes 
Javascript :: Obtain smallest value from array of objects in Javascript 
Javascript :: javascript format date 
Javascript :: react public pic 
Javascript :: how to delete file from firebase storage on web 
Javascript :: get form data as object jquery 
Javascript :: $(document).ready(function() alert 
Javascript :: $lookup in mongodb 
Javascript :: javascript in keyword 
Javascript :: dataset js 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =