使用novalidate属性可以指定禁用表单时不应对其进行验证。您可以尝试运行以下代码以实现novalidate属性-
<!DOCTYPE html> <html> <head> <title>HTML novalidate attribute</title> </head> <body> <form action = "" method = "get" novalidate> Student Name<br><input type = "name" name = "sname"><br> Rank<br><input type = "number" name = "rank"><br> <input type = "submit" value = "Submit"> </form> </body> </html>