基本信息
源码名称:金额检测
源码大小:0.84KB
文件格式:.7z
开发语言:js
更新时间:2018-03-07
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 1 元 
   源码介绍



         //$.fn.numeral = function () {
            //    this.bind("keypress", function (e) {
            //        var code = (e.keyCode ? e.keyCode : e.which);  //兼容火狐 IE   
            //        if (!$.browser.msie && (e.keyCode == 0x8))  //火狐下不能使用退格键  
            //        {
            //            return;
            //        }
            //        return code >= 48 && code <= 57;
            //    });
            //    this.bind("blur", function () {
            //        if (this.value.lastIndexOf(".") == (this.value.length - 1)) {
            //            this.value = this.value.substr(0, this.value.length - 1);
            //        } else if (isNaN(this.value)) {
            //            this.value = "";
            //        }
            //    });
            //    this.bind("paste", function () {
            //        var s = clipboardData.getData('text');
            //        if (!/\D/.test(s));
            //        value = s.replace(/^0*/, '');
            //        return false;
            //    });
            //    this.bind("dragenter", function () {
            //        return false;
            //    });
            //    this.bind("keyup", function () {
            //        if (/(^0 )/.test(this.value)) {
            //            this.value = this.value.replace(/^0*/, '');
            //        }
            //    });
            //};

            //$("#txt_Hourly_Rate").keyup(function () {
            //    //如果输入非数字,则替换为'',如果输入数字,则在每4位之后添加一个空格分隔
            //    this.value = this.value.replace(/[^\d]/g, '').replace(/(\d{4})(?=\d)/g, "$1 ");
            //})

            //调用文本框的id
            //$("#txt_Hourly_Rate").numeral();

            //$("#txt_Hourly_Rate").keyup(function () {
            //    var reg = $(this).val().match(/\d \.?\d{0,2}/);
            //    var txt = '';
            //    if (reg != null) {
            //        txt = reg[0];
            //    }
            //    $(this).val(txt);
            //}).change(function () {
            //    $(this).keypress();
            //    var v = $(this).val();
            //    if (/\.$/.test(v)) {
            //        $(this).val(v.substr(0, v.length - 1));
            //    }
            //});