[英]How to add automatic dots to prices in HTML?
我正在尝试对网页实施自动格式化。 这样,当您键入12345678时,它将自动是123.456,78欧元。
<div class="form-group">
<input type="text" required class="form-control" name="EKBrutto" placeholder="EK-Brutto">
我不知道该怎么做。
您可以使用以下链接来掩盖金钱,尤其是您在处理金钱时
https://plugins.jquery.com/maskMoney/
而以下链接是一个演示
http://plentz.github.io/jquery-maskmoney/
基本上,您拥有的是:
<input type="text" id="currency" />
然后你把这个脚本
<script>
$(function() {
$('#currency').maskMoney();
})
</script>
这会自动将点放到位,但是还有更多参数可帮助您阅读指南:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.