我已經形式:春天<form:form>兩項行動和兩個提交類型一種形式
<form:form id="searchForm" modelAttribute="fbosAttributes" action="result" method="get">
....
</form:form>
裏面這種形式我有兩個提交按鈕與名稱:
<input type="submit" name="ashtml" value="${labelbuttonhtml}"/>
<input type="submit" name="asexcel" value="${labelbuttonxls}"/>
這兩個按鈕工作正常在我的控制,我用params
不同的方法來識別:
@RequestMapping(value="/result.xls", method=RequestMethod.GET, params="asexcel")
釷問題是如何使這個按鈕對不同的動作做出反應,以及如何在窗體內添加兩個動作?
我不熟悉JavaScript和任何人在所有。 –
看到這個http://stackoverflow.com/questions/942772/html-form-with-two-submit-buttons-and-two-target-attributes – varun