zoukankan      html  css  js  c++  java
  • CSS中input属性强制小写字母转大写

    text-transform    ------------------  uppercase
     
     
    $("#autType").on("input",inputLimitsHandle);
        function inputLimitsHandle(){   //只能输入数字和大写字母
            if($("#autType").attr("placeholder") == "请输入公司社会信用统一代码"){
                $("#autType").attr("maxlength","18").css("text-transform","uppercase");
                var that = $(this);
                if(that.val() != ""){
                    that.removeClass("required");
                }else{
                    that.addClass("required");
                };
                
                that.val(that.val().replace(/[W]/g,''));
                if(that.val().length > 18){
                    that.val(that.val().slice(0,18));
                };
            }else if($("#autType").attr("placeholder") == "请输入营业执照号"){
                $("#autType").attr("maxlength","15");      //只能输入数字
                var that = $(this);
                if(that.val().length > 15){
                    that.val(that.val().slice(0,15));
                };
                that.val(that.val().replace(/[^d]/g,''));
            }
        };
  • 相关阅读:
    [BZOJ2434][Noi2011]阿狸的打字机
    [BZOJ2303][Apio2011]方格染色
    [BZOJ1912][Apio2010]patrol 巡逻
    [BZOJ1179][Apio2009]Atm
    [BZOJ1178][Apio2009]CONVENTION会议中心
    Lock-less buffer management scheme for telecommunication network applications
    vue-router@2.x 只适用于 Vue 2.x 版本。
    jQuery 捕获
    jQuery Chaining
    jQuery Callback 方法
  • 原文地址:https://www.cnblogs.com/swt-axios/p/12841965.html
Copyright © 2011-2022 走看看