如何在 HTML 中指定发送表单数据时使用的 HTTP 方法?
htmlweb developmentfront end technology更新于 2025/8/16 11:24:17
使用 method 属性指定在 HTML 中发送表单数据时使用的 HTTP 方法。
示例
您可以尝试以下代码来实现 method 属性 −
<!DOCTYPE html> <html> <head> <title>HTML option Tag</title> </head> <body> <form action = "/cgi-bin/dropdown.cgi" method = "post"> <select name = "dropdown"> <option value = "HTML" selected>HTML</option> <option value = "Ruby">Ruby</option> </select> <input type = "submit" value = "Submit" /> </form> </body> </html>
相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

