标签:a* parse value text ber class fun for number
<script type="text/javascript">
function count(){
var a = parseFloat(document.getElementById("c-price").value);
var b = parseFloat(document.getElementById("c-number").value);
var c = a*b;
var d ;
d = c.toFixed(2);
document.getElementById("c-sumprice").value = d;
}
</script>
<div class="col-xs-12 col-sm-8">
<input id="c-sumprice" data-rule="required" class="form-control" step="0.001" name="row[sumprice]" type="number" value="{$row.sumprice|htmlentities}" onclick="count()">
</div>
标签:a* parse value text ber class fun for number
原文地址:https://www.cnblogs.com/apolloren/p/12096977.html