Firefox 中的 HTML5 輸入框型別“number”


min屬性的輸入型別數字不受 Firefox 支援,但它可以在 Google Chrome 中正常工作。

示例

讓我們看一個示例 −

<!DOCTYPE html>
<html>
   <head>
      <title>HTML input number</title>
   </head>
   <body>
      <form action = "" method = "get">
         Mention any number between 1 to 10
         <input type = "number" name = "num" min = "1" max = "10"><br>
         <input type = "submit" value = "Submit">
      </form>
   </body>
</html>

更新於: 04-6 月-2020

721 次瀏覽

開啟您的 事業

透過完成課程獲得認證

開始
廣告
© . All rights reserved.