如何在 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>
廣告
使用 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>