input reset 重置时间

经验规律,301毫秒。


function autoFormatMoney() {
     if (!this.value.length) {return}
     var num = parseFloat(this.value.replace(/,/g, ''));
     if (isNaN(num)) {return}
     var name = this.name;
     if (name === 'paymentValue') {
         this.value = window.format_number(num);
         form.paymentRatio.value = ((num / totalAsset)*100).toFixed(3);
         !triggerFromReset && $(form.paymentRatio).trigger('focus');
     } else if (name === 'paymentRatio') {
         this.value = num.toFixed(3);
         form.paymentValue.value = window.format_number(( num / 100 )* totalAsset);
     } else if(name === 'fees' || name === 'insurance'){
         this.value = window.format_number(num);
     } else if(name === 'rate' || name === 'taxes'){
         this.value = num.toFixed(3);
     }
     triggerFromReset = false;
 }

 $(form.homePrice).on('change', autoFormatMoney).trigger('change');
 $(form.paymentValue).on('change', autoFormatMoney).trigger('change');
 $(form.paymentRatio).on('change', autoFormatMoney).trigger('change');
 $(form.fees).on('change', autoFormatMoney).trigger('change');
 $(form.taxes).on('change', autoFormatMoney).trigger('change');
 $(form.rate).on('change', autoFormatMoney).trigger('change');
 $(form.insurance).on('change', autoFormatMoney).trigger('change');

 $('.calculator-func_reset').on(Data.CLICK,function(e){
     triggerFromReset = true;
     setTimeout(function() {
         $sindeoCal.find('input').trigger('change');
     }, Data.isMobile?301:10);
 });

// input readonly 之后依旧调起输入法 unselectable="on" onfocus="this.blur()"
$('.slide-figure').on('focus','input',function () {
    if (data.isLogin){
        $(this).attr('unselectable','on');
        $(this).blur();
    }
});

类似点透

$('.toggle-show').on(CLICK,function(){
    $('.toggle-text').toggle();
    $('.toggle-icon').toggleClass('icon-up');
    $('.toggle-input').toggle(100);
    $('.m-calc input[name="propertyTaxRate"]').one('focus',function () {
        $(this).blur();
    });
});

转载于:https://www.cnblogs.com/lakeInHeart/p/7815890.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值