[英]Cleave.js, getting the country code telephone digit for a particular country
For Anybody familiar with cleave.js out there.对于任何熟悉 cleave.js 的人。 am I able to get the country code digit?我能得到国家代码数字吗? in this case here for Italy, am I able to access the 39 for Italy?在这种情况下,意大利的情况下,我可以访问意大利的 39 吗? 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.或者,如果您只想获取您收集的信息,请将 Cleaver 的 object 存储在上述任何变量中。 so that you can use it anywhere.这样您就可以在任何地方使用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.