如何在 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>

更新於: 2020 年 3 月 3 日

101 次瀏覽

開啟你的 職業生涯

完成課程認證

立刻開始
廣告
© . All rights reserved.