开发者

IE showing "decimal" instead of "comma"

I am having an issue with a slider (implemented using Prototype) and IE7. Upon the slider value change I update a with the value such as "42开发者_JAVA百科0,000".

Now on all browsers other than IE7 this is display correctly. But on IE7 it is displayed as "420.000" ..

my question is how did the "," become "."

the page has UTF-8 meta tag.

Any help?


Are you testing IE7 on a different machine or a VM? (I'm assuming so since getting multiple versions of IE on the same machine is practically impossible). It's possible that machine is set to a different locale. It's common in some European countries (not sure which ones) to use "." as the thousands separator, and "," as the decimal.

If this is the case, consider this a good test of how your software might behave for European visitors to your site.


Use the toLocaleString() method of Numbers instead of hard-coding a locale so the user's own locale is used.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜