简体   繁体   中英

Cleave.js, getting the country code telephone digit for a particular country

For Anybody familiar with cleave.js out there. am I able to get the country code digit? in this case here for Italy, am I able to access the 39 for Italy? I am working on a form that will auto complete and show the country code (digits) and could not find a way to grab the digits.

new Cleave('.my-input', {
    phone: true,
    phoneRegionCode: 'IT'
});

Yes looks right, what error did you see while running.

let cleaverObj = new Cleave('.my-input', {
    phone: true,
    phoneRegionCode: 'IT'
});

or if you just want to get the information you collected, store the object of Cleaver in any variable like above. so that you can use it anywhere.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM