I have input field form to enter credit card number and I want to enter first 4 and last 4 digits how can I do it?
For example: In image when I focus and fill input it must fill group 1 and group 2 characters
My HTML
<input type="text" name="kredi_karti" id="kredi_karti" class="form-control kredi_karti">
jQuery code:
$(document).on("focus",".kredi_karti",function(){
$(this).mask("9999 9999 9999 9999",{placeholder:"XXXX XXXX XXXX XXXX"});
});