html - HTML 表单接受/拒绝按钮
问题描述
所以我有这个带有两个按钮的 HTML 表单,分别是“接受”和“拒绝”。
<div class="disclaimerAD top">
<form enctype="application/x-www-form-urlencoded" action="index.html" method="post">
<input type="hidden" name="id" value="5" id="id">
<input type="hidden" name="process" value="1" id="process">
<input type="submit" name="accept" id="accept" value="Accept">
<input type="submit" name="decline" id="decline" value="Decline"></form> </div>
<form enctype="application/x-www-form-urlencoded" action="index.html" method="post">
<input type="hidden" name="id" value="5" id="id">
<input type="hidden" name="process" value="1" id="process">
<input type="submit" name="accept" id="accept" value="Accept">
<input type="submit" name="decline" id="decline" value="Decline"></form>
这不是我的代码,我不知道为什么有两个。
现在点击“接受”或“拒绝”会将用户带到“index.html”。但我想点击“Accept”将用户带到“index.html”并点击“Decline”来刷新页面,这称为“5.html”。我怎样才能让它工作?
解决方案
删除 Decline 输入字段并改用指向 5.html 的链接。如果需要,您可以使用 CSS 使它们看起来相同。
推荐阅读
- listview - ListView ItemTapEvent 使用 MVVMLight
- php - 基于 Woocommerce 中的运输等级和最低金额的有条件免费送货
- windows - 你能修复我的 Ctrl+Left Ctrl+Shift+Left 脚本吗?
- http - 如果使用 apache camel,http 和 https 连接将保留在“CLOSE_WAIT”中
- sas - 是否可以使用面板数据对 SAS 进行配对 t 检验?
- c# - 动态定义需要识别值的键名
- css - 为什么我的响应式 Google 表单 iFrame 代码无法在所有浏览器和设备上运行?
- javascript - 如何更改表单字段中的 Action 属性?HTML
- c++ - 无法从 int main() 主体调用函数
- javascript - 使用来自 javascript innerHtml 的 thymeleaf 将数据传递给 Spring Boot 控制器