Je rencontre un problèmes, je dois réaliser un input aux format monnaie.
J'utilise :
Code : Tout sélectionner
<div class="formRow">
<div class="grid3"><label for="name">Prix € :</label>
<div class="grid5"><input type="text" id="htmlfield" name="price">
</div></div>
Code : Tout sélectionner
<script type="text/javascript" src="js/monais/jquery.price_format.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.js"></script>
<script type="text/javascript">
$(function(){
$('#example5').priceFormat({
clearPrefix: true
});
$('#htmlfield').priceFormat({
prefix: '€ ',
suffix: '',
centsSeparator: '.',
thousandsSeparator: ',',
useLakhs: false,
lakhsSeparator: ",",
limit: false,
centsLimit: 2,
clearPrefix: false,
clearSufix: false,
allowNegative: false,
insertPlusSign: false,
precision: 0 // How many decimal places are allowed
});
});
</script>
Merci de votre aide.