我需要一个输入的解决方案。 这个解决方案很好,但不适用于单一输入。 我不是 js 程序员;-(
$('.price > div').click(function(){
$('.price > input:eq('+$('.price > div').index(this)+')').focus();
});
$('.numberOnly').on('keydown', function(e){
http://jsfiddle.net/pmrotule/93zgymx9/
请帮帮我
最佳答案
只需删除其他输入并仅保留:
<div class="price">
<input type="text" class="numberOnly" autocomplete="off" maxlength="50" /><div>$</div>
</div>
关于javascript - js自动更改数字格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41162373/