前端
<form action="Confirm">
<div class="col-md-3 col-md-offset-4">
<button name="daoda" value="1" class="btn btn-primary" id="querendaoda" style="background-color: <%= color %>;border-color:<%= color %>;color: <%= front %>">确认对方已到达</button></div>
<div class="col-md-3">
<button name="daoda" value="2" class="btn btn-default" id="querenwancheng" style="background-color: lavender;color: #adadad" οnclick="<%= hanshu%>">确认完成任务</button>
</div>
</form>
servlet
String value=(String)request.getParameter("daoda");
if(value.equals("1")){request.getRequestDispatcher("../Cover.html").forward(request,response);}
else if(value.equals("2"))
{request.getRequestDispatcher("../task.html").forward(request,response);}