我不想让邮政编码的首字母全为零。
$('#zipcode').mask("Y0000", {
'clearIfNotMatch': true,
'translation': {
Y: {
pattern: /[1-9]/
}
}
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.10/jquery.mask.js"></script>
<input name="zipcode" id="zipcode" class="form-control" type="text" required>