Html5 MaskedInput
Invoke the val method of the jqxMaskedInput Author: http://jqwidgets.com
by jqwidgets
HTML
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<script src="https://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<input id='jqxMaskedInput' />
JavaScript
$("#jqxMaskedInput").jqxMaskedInput({
width: '250px',
height: '25px'
});
$('#jqxMaskedInput').jqxMaskedInput('val', '1242');