HTML表单接受/拒绝按钮

时间:2018-07-03 02:20:31

标签: html html5 forms html-form

所以我有这个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”。我该如何工作?

1 个答案:

答案 0 :(得分:0)

删除“拒绝”输入字段,并使用指向5.html的链接。如果需要,可以使它们与CSS看起来一样。

相关问题