input 박스 소수점 2자리 제한 스크립트
마스터욱
0
43
0
0
2021-03-16 17:32:25
<script type="text/javascript">
$(document).ready(function(){
var myInput = document.getElementById("order_spreed_per_input");
myInput.addEventListener("keyup", function(){
myInput.value = myInput.value.replace(/(\.\d{2})\d+/g, '$1');
});
});
</script>
<input type="number" name="order_spreed_per_input" step="0.01" id="order_spreed_per_input" value="" /> %