jquery 银行卡号验证

具体参考:https://github.com/jondavidjohn/payform

插件js: jquery.payform.js

具体操作

alert($.payform.validateCardNumber('4242424242424242'));//true
alert($.payform.parseCardType('4242424242424242'));//visa / Visa
alert($.payform.parseCardType('6042708104454470'));//discover / Discover
alert($.payform.parseCardType('5265541846020487'));//mastercard / Master
alert($.payform.parseCardType('3412121212121212'));//amex / Express
posted on 2016-06-20 09:59  qinyahui  阅读(573)  评论(0编辑  收藏  举报