搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

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

  • 1 回覆
  • 8 有這個問題
  • 1 次檢視
  • 最近回覆由 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 於 修改