2
Well I’m using the jquery Mask plugin at input value. The formatting I am using is the following '0,000'. I wondered how to change the formatting to '0,000' when I select KG in select'.
$('.valor').mask('00.000.000,00', {
reverse: true
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.3/jquery.mask.js"></script>
<input type='text' class='valor' name='valor'>
<select name='categoria' class='select form_campos'>
<option value='1'>R$</option>
<option value='2'>KG</option>
</select>
very good, that’s exactly what I wanted to do. Thank you
– Hugo Borges
@Hugoborges If Lucascosta’s answer solved your problem, don’t forget to mark the answer as a solution for other people to help!
– JuniorNunes
Well remembered, thank you @Juniornunes!
– BrTkCa
is waiting for the time hahaha
– Hugo Borges