搜尋 Mozilla 技術支援網站

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

Learn More

Input type="number": why "wrong" locale

  • 1 回覆
  • 1 有這個問題
  • 11 次檢視
  • 最近回覆由 cor-el

more options

Situation See fiddle: https://jsfiddle.net/ssczo/gh47Lfs7/2/ I do not understand why I have to set de language specific on the control, like on the 4. input in the sample. I suspect that also version 3 should work, if i set my browser to de-CH or if i set my OS to de-CH. Version 3 not accepts "point" which is the default decimal separator for de-CH

I'm confused about from where the browser takes the language?

See my browser settings are the attchement.

Situation See fiddle: https://jsfiddle.net/ssczo/gh47Lfs7/2/ I do not understand why I have to set de language specific on the control, like on the 4. input in the sample. I suspect that also version 3 should work, if i set my browser to de-CH or if i set my OS to de-CH. Version 3 not accepts "point" which is the default decimal separator for de-CH I'm confused about from where the browser takes the language? See my browser settings are the attchement.

由 stephu 於 修改

所有回覆 (1)

more options

This looks like a nightmare to implement, especially when it comes to browser support. See e.g.: https://ctrl.blog/entry/html5-input-number-localization