我想过这样的事情,但我不想使用按钮提交,我会通过点击春季消息来提交。这有可能吗?
<spring:url value="/admin/messages" var="messagesUrl" htmlEscape="true"/>
<form action="${messagesUrl}" method="POST" class="new-message">
<input type="hidden" name="messageFromDashboard" value="true">
<spring:message code="${newMessage}">
<input type="submit" value="submit"></spring:message>
</form>
也许这会有所帮助。为什么不想使用提交按钮?如果你只是想让它看起来像一个标签/链接,只需使用类似于http://jsfiddle.net/adardesign/5vHGc/
Html:
<button> your button that looks like a link</button>
Css:
button {
background:none!important;
border:none;
padding:0!important;
/*optional*/
font-family:arial,sans-serif; /*input has OS specific font-family*/
color:#069;
text-decoration:underline;
cursor:pointer;
}