zoukankan      html  css  js  c++  java
  • 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();
        });
    });
    
  • 相关阅读:
    玉米不怕累,宇春最珍贵
    幸福
    谷歌位置搜索 蹩脚结合jquery.ui.gmap
    Resharp Format XML config
    正则表达取得 image src 中值
    一个Gif处理的类库
    使用nuGet管理自己的包
    正则表达式语言 快速参考
    动态加入JS及加入CSS
    检测是一个时间串或一个数字串是否连续
  • 原文地址:https://www.cnblogs.com/lakeInHeart/p/7815890.html
Copyright © 2011-2022 走看看