How do you detect Credit card type based on card number

Prem Tiwari - - Freebies, JavaScript


Hi Friend, I got some tutorial request from my regular blog readers. The question is “How do you detect Credit card type based on card number?”. I have done some R&D and finally got the Javascript code which detects the credit card type based on the credit card number.

Below is the simple and easy JavaScript code to detect credit card type when you type any credit card. Copy the below and use it in your web application.

How do you detect Credit card type based on card number

You can use it with PHP, ASP.net, and Java web technologies. copy paste below code in your page before head tag close.

For the display the ooutput use below html code.

Then output will be:


Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer and a blogger by hobby.

Tags: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.