Example of jQuery inputmask.
- html form
<input id="test" type="text"></input>
<button id="btn">click</button>
- css
#test {
text-transform:uppercase;
}
- js
$('#test').inputmask({
mask: "99-99-99",
definitions: {'9': {validator: "[a-zA-Z0-9]"}}
});
$('#test').focus();
$('#btn').click(function(){
$('#test').prop('value', $('#test').val().toUpperCase());
console.log($('#test').val());
console.log($('#test').prop('value'));
});