简体   繁体   中英

Intl.NumberFormat is not supporting in Lower Versions of IE while trying to format number to remove Thousands separator with different culture

I'm trying to format number and remove thousands separator with respect to different culture , It is working in IE 11 but not in lower versions.

 var test=new Intl.NumberFormat('en-US', {
  minimumIntegerDigits: 4,
  maximumFractionDigits: 4,
  useGrouping: false
}).format(formattedNumber); //formattedNumber=11,222,33.555

根据caniuse.com,Intl api不适用于IE <= 10.您应该考虑使用polyfill,例如https://github.com/andyearnshaw/Intl.js ,或其他支持旧浏览器的数字格式库。

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