设置以HTML提交表单时将表单数据发送到何处?
使用HTML中的formaction 属性来设置以HTML提交表单时将表单数据发送到的位置。
示例
您可以尝试运行以下代码以实现formaction 属性-
<!DOCTYPE html>
<html>
<head>
<title>HTML formaction attribute</title>
</head>
<body>
<form action = "/new1.php" method = "get">
Student name: <input type ="text" name = "name"><br>
Student Subject: <input type = "text" name = "subject"><br>
<button type = "submit">Submit</button><br>
<button type = "submit" formaction = "/new2.php">Another page</button>
</form>
</body>
</html>热门推荐
4 年月日祝福语简短
10 情人表白祝福语简短大气
11 圣诞饭店祝福语大全简短
12 孙子结婚奶奶祝福语简短
13 高考祝福语简短10字
14 送给老师中秋祝福语简短
15 祝福语大全简短6个
16 新疆新年祝福语大全简短
17 分别祝福语简短情侣短句
18 异性朋友简短生日祝福语