BankInput bank card account formatting based on jquery_jquery
May 16, 2016 pm 05:50 PMThe jquery bankInput plug-in is a formatted display of bank cards. It can control the minimum and maximum number of inputs in the text box, control only the input of numbers, control not pasting, and the use of input methods. At the same time, the plug-in can automatically load formatted display and support formatted display of non-input boxes.
<script>$(".account").bankInput()$(".account").bankList( ) <br></script>
1. Default usage:
$("#account").bankInput();
2. Set parameters
$ ("#account").bankInput({min:16,max:25,deimiter,' '});
3. Non-text box formatted display
$(".account").bankList() ;
/**
× JQUERY simulates Taobao control bank account input
* @Author 312854458@qq.com Rising Sun
**/
(function($){
//Input box formatting
$.fn.bankInput = function(options){
var defaults = {
min : 10, // Minimum number of input characters
max : 25, // Maximum number of characters to enter
deimiter : ' ', // Account delimiter
onlyNumber : true, // Only numbers can be entered
copy : true // Allow copying
} ;
var opts = $.extend({}, defaults, options);
var obj = $(this);
obj.css({imeMode:'Disabled',borderWidth:'1px', color:'#000',fontFamly:'Times New Roman'}).attr('maxlength', opts.max);
if(obj.val() != '') obj.val( obj.val ().replace(/s/g,'').replace(/(d{4})(?=d)/g,"$1" opts.deimiter) );
obj.bind('keyup' ,function(event){
if(opts.onlyNumber){
if(!(event.keyCode>=48 && event.keyCode<=57)){
this.value=this.value. replace(/D/g,'');
}
}
this.value = this.value.replace(/s/g,'').replace(/(d{4}) (?=d)/g,"$1" opts.deimiter);
}).bind('dragenter',function(){
return false;
}).bind('onpaste', function(){
return !clipboardData.getData('text').match(/D/);
}).bind('blur',function(){
this.value = this. value.replace(/s/g,'').replace(/(d{4})(?=d)/g,"$1" opts.deimiter);
if(this.value.length < opts.min){
alertMsg.warn('Enter at least 'opts.min' account information! ');
obj.focus();
}
})
}
// List display formatting
$.fn.bankList = function(options){
var defaults = {
deimiter : ' ' // delimiter
};
var opts = $.extend({}, defaults, options);
return this.each(function() {
$(this).text($(this).text().replace(/s/g,'').replace(/(d{4})(?=d)/g,"$1 " opts.deimiter));
})
}
})(jQuery);

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Two WeChat accounts cannot be bound to the same bank card. Bind a bank card to a WeChat account: 1. Open the WeChat application, click the "Me" option, and then select the "Pay" option; 2. Select the "Add Bank Card" option and enter the bank card information as prompted; 3. Once the bank card is successfully bound, users can use the bank card to make payments and transfers in WeChat.

Other people's bank cards cannot be bound to your own WeChat. Steps to bind a bank card to WeChat: 1. Open the WeChat APP and enter the account number and password you need to log in for the first time; 2. Select "Me", then "Pay"; 3. Select "Wallet"; 4. Select "Bank Card" "; 5. Select "Add Bank Card"; 6. Enter the WeChat payment password; 7. Enter the bank card number to be bound, and then click "Next" to complete the bank card binding.

1. Open the WeChat app, enter the [Me] page, select the [Service] menu, and click [Wallet]. 2. Select the [Bank Card] option, select the bank card to be unbound in the bank card interface, and enter its details page. 3. Finally, click the three-dot icon in the upper right corner, select [Unbind] and enter the payment password to complete the unbinding process.

1. Open the WeChat app, click [Me] in the lower right corner, select the [Service] option, and click [Wallet]. 2. Select the [Bank Card] option, select and click the bank card you want to unbind on the bank card interface, and enter the bank card details page. 3. Click the [three dots] icon in the upper right corner, select [Unbind], and enter the payment password to complete the unbinding operation.

1. Open the Alipay app, enter the [My] page, select the [Bank Card] option, and click on the target bank card. 2. On the bank card interface, select [More Functions], enter [Help Center], check the reason for unbinding and click [Go to Unbind]. 3. Finally, select [Still want to unbind] and enter the payment password to complete the bank card unbinding.

1. Open the Meituan app, click [My] in the lower right corner, and click [Enter Wallet] on the right side of [Wallet]. 2. Select the [Bank Card] option, select and click the bank card that needs to be unbound, and enter the bank card interface. 3. Click [Bank Card Management], select [Unbind] in the pop-up window, and click [Still want to unbind]. 4. Enter the payment password on the identity verification interface, select [Reason for unbinding] or click [Skip] in the upper right corner.

1. Open Alipay and go to the [My] page, select the [Bank Card] option and click on the target bank card. 2. In the bank card interface, select [More Functions] and enter [Help Center], check the reason for unbinding and click [Go to Unbind]. 3. Finally, select [Still want to unbind] and enter the payment password to complete the bank card unbinding.

Binding bank cards to your phone is only safe by choosing trustworthy apps, setting strong passwords and fingerprint recognition, turning on two-factor authentication, regularly checking account and transaction records, using public Wi-Fi with caution, and protecting the security of the phone itself. Detailed introduction: 1. Choose a trustworthy mobile application. Before binding a bank card, make sure that the downloaded and installed application comes from official channels; 2. Ensure that the mobile phone system and applications are updated and update the mobile phone system and applications in a timely manner. To ensure that the latest security protection measures can be obtained in a timely manner; 3. Set strong passwords and fingerprint recognition, etc.
