如何在HTML中指定表单提交时要发送表单数据的位置?
使用操作属性添加文件,点击提交按钮后您想要到达的位置。您还可以添加电子邮件以将数据发送到该电子邮件 ID。
示例
您可以尝试运行以下代码来设置当表单数据发送到何处时表单以 HTML 形式提交 -
<!DOCTYPE html> <html> <body> <h2>Student Contact Form</h2> <form action = mailto:emailid@example.com method = post enctype = text/plain> Student Name:<br><input type = text name = sname> <br> Student Subject:<br><input type = text name = ssubject><br> <input type = submit value = Send> </form> </body> </html>
以上就是如何在HTML中指定表单提交时要发送表单数据的位置?的详细内容,更多请关注双恒网络其它相关文章!