搜尋 Mozilla 技術支援網站

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

Learn More

input[type='number'] not working

  • 1 回覆
  • 1 有這個問題
  • 12 次檢視
  • 最近回覆由 TyDraniu

more options

Facing an issue with input tag when type attribute is set to 'number'. This allows me even to enter letters and special characters. Basically the check of type number is not working. Please look into this.

Attaching a screenshot of the MDN website. The input area corresponding to the type number allows me to enter the characters. You can see that I have entered '@!25'. Requesting to please look into this asap.

Facing an issue with input tag when type attribute is set to 'number'. This allows me even to enter letters and special characters. Basically the check of type number is not working. Please look into this. Attaching a screenshot of the MDN website. The input area corresponding to the type number allows me to enter the characters. You can see that I have entered '@!25'. Requesting to please look into this asap.
附加的畫面擷圖

所有回覆 (1)

more options

Hi, that's OK for us and we're not going to change it for now. You can use the client-side validation, or filter your keys using keydown events.