如何在 HTML 中新增最大值?


使用 max 屬性在 HTML 中新增最大值。可以嘗試執行以下程式碼來實現 max 屬性 - 

示例

<!DOCTYPE html>
<html>
   <body>
      <form action="">
         Rank:
         <input type = "number" name = "rank" min = "1" max = "10"><br>
         <input type = "submit">
      </form>
   </body>
</html>

更新於:03-Mar-2020

101 次瀏覽

開啟您的 職業

完成課程並獲得認證

開始學習
廣告
© . All rights reserved.