国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home Web Front-end JS Tutorial BankInput bank card account formatting based on jquery_jquery

BankInput bank card account formatting based on jquery_jquery

May 16, 2016 pm 05:50 PM
bank card

The 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.

Copy code The code is as follows:


<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() ;
Copy code The code is as follows:

/**
× 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);
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1502
276
Can two WeChat accounts be bound to the same bank card? Can two WeChat accounts be bound to the same bank card? Aug 25, 2023 pm 03:13 PM

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.

Can someone else's bank card be bound to my WeChat account? Can someone else's bank card be bound to my WeChat account? Aug 25, 2023 am 10:03 AM

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.

How to unbind bank card via WeChat How to unbind bank card via WeChat Apr 24, 2024 am 10:52 AM

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.

How to unbind a bank card using WeChat How to unbind a bank card using WeChat Mar 29, 2024 pm 03:15 PM

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.

How to unbind Alipay bank card How to unbind Alipay bank card Apr 26, 2024 am 10:19 AM

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.

How to unlink bank cards from Meituan How to unlink bank cards from Meituan Mar 27, 2024 pm 04:38 PM

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.

How to unbind Alipay bank card How to unbind Alipay bank card Apr 25, 2024 am 10:37 AM

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.

How to set up a safe way to bind a bank card to a mobile phone How to set up a safe way to bind a bank card to a mobile phone Sep 25, 2023 pm 03:29 PM

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.

See all articles