为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

decimal symbol is a comma for input type=number but OS is set to a point

  • 1 个回答
  • 8 人有此问题
  • 255 次查看
  • 最后回复者为 AndrewG2

more options

I have a form with an input <input id="quantity" name="quantity" step="0.01" type="number"> but when I type something like 5.5 it tells me that is not valid. The regional setting in Windows 10 are set to use a point as the decimal symbol, but Firefox will only accept it as a number if I use a comma e.g. 5,5

It also did this on Windows 7. Other browsers do accept the point symbol.

I have a form with an input <input id="quantity" name="quantity" step="0.01" type="number"> but when I type something like 5.5 it tells me that is not valid. The regional setting in Windows 10 are set to use a point as the decimal symbol, but Firefox will only accept it as a number if I use a comma e.g. 5,5 It also did this on Windows 7. Other browsers do accept the point symbol.

被采纳的解决方案

I have figured out what was causing it. I had declared the language in html as en-ZA. Changing it to en fixed the problem i.e. <html lang="en">

定位到答案原位置 👍 1

所有回复 (1)

more options

选择的解决方案

I have figured out what was causing it. I had declared the language in html as en-ZA. Changing it to en fixed the problem i.e. <html lang="en">

由AndrewG2于修改