在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:plentz/jquery-maskmoney开源软件地址:https://github.com/plentz/jquery-maskmoney开源编程语言:JavaScript 96.9%开源软件介绍:jQuery maskMoneyJust a simple way to create masks to your currency form fields with jQuery. DownloadTo get the latest(minified) version, click here. You can also use CloudFlare's cdnjs. Just choose the version you want to use here. Show Time!To view a complete demonstration of it's features and usage, access our examples page! Usage:<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<script src="dist/jquery.maskMoney.min.js" type="text/javascript"></script>
</head>
<body>
<input type="text" id="currency" />
</body>
<script>
$(function() {
$('#currency').maskMoney();
})
</script> Options:The options that you can set are:
IMPORTANT: if you try to bind maskMoney to a read only field, nothing will happen, since we ignore completely read only fields. So, if you have a read only field, try to bind maskMoney to it, it will not work. Even if you change the field removing the readonly property, you will need to re-bind maskMoney to make it work. Bonus!We have 3 bonus methods that can be useful to you:
You can also configure maskMoney options using the data-* API instead of passing it as a hash in the <input type="text" data-affixes-stay="true" data-prefix="R$ " data-thousands="." data-decimal="," /> And when you bind maskMoney to that field, we will read those options. ATTENTION: for settings that isn't entirely lowercase, you will need to use dashes instead of capital letters. For example, to set Tests:To run our test suite, just clone the repo and open
Contributors:
License:jQuery-maskMoney is released under the MIT license. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论